Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate usage--sql syntax error

 
suresh mandalapu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i am newbee to hibernate and mysql.
when i try to run a sample hibernate is giving me the following error
Unsuccessful: create table EVENTS (EVENT_ID bigint generated by default as identity (start with 1), EVENT_DATE timestamp, title varchar(255), primary key (EVENT_ID))
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'generated by default as identity (start with 1), EVENT_DATE timestamp, title var' at line 1
schema export complete....
and when i try to run the query ...
create table EVENTS (EVENT_ID bigint generated by default as identity (start with 1), EVENT_DATE timestamp, title varchar(255), primary key (EVENT_ID))
mysql also giving the same error..
with out that generated by default as identity (start with 1) mysql is successfully executing the query..
whats wrong with generated by default as identity (start with 1)
why hibernate is generating the extra words generated by default as identity (start with 1)

thannks suresh
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know, but I use this for my ids.



How do you identify your ids?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic