• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reg. Updation in MySQL Database using Hibernate.  RSS feed

 
Sakthi Ramasamy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Composite key and i need only one of its key to get auto incremented. How is it possible to do it in Hibernate?


I have set that key in MySQL Database to be a auto-increment but it is not functioning properly. I am encountering the following scenario. Actually the MySQL sequence starts with 1000, but while inserting to frontend, the first Primary key generated is 2 [not 1] and then 3, from third insertion onwards it is getting updated on 3 and no insertion is performed. Is it because of some session issues?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!