• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate 4 Id generation

 
Himanshu Mishra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using hibernate 4 as JPA provider, the database used is sql server 2005. I was trying to create a new records in a table using JPA. The table does not have an identity column but there is a primary key column. With Hibernate 3, I am able to create the records but not with hibernate 4. It gives me error like "Hibernate_sequence" does not exists.

I have tried "Identity" and "Auto". With hibernate 3, I dont have to specify any generator.

The error is " could not read a hi value: java.sql.SQLException: Invalid object name 'hibernate_sequence'"

Thanks,
Himanshu
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this one could be helpful.
 
Himanshu Mishra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks you..

That helps....
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad I could help!

Nice to know: instead of making a "thank you" post, you could also the post(s) which you liked. It's easier, faster and other ranchers will see immediately which are the "starred" posts.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic