• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot increment the generator id in HIbernate 3.0

 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cannot increment the generator id.
I am getting this error when i am using Hibernate 3.0 and its working fine with Hibernate 2.0.
Please Help.
 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.hibernate.exception.SQLGrammarException: could not fetch initial value for increment generator
this excepetion is shown in console
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vikas,
Since this isn't about Struts, I'll move it to our Object Relational Mapping forum for you.
 
Vijay Gadde
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vikas can you post your Hibernate Mapping file and can you let us know which DB version your using.

Here is the example code, if you are using SQL Server2005 this might help you.

Remember to use correct Generator class according to your Data Base.
Thanks,Vijay Gadde
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic