Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate session management

Swapnil Dharane
Ranch Hand
Posts: 55
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys
I am trying an example for one to many mapping using below code:

Here,for the first round of execution,3 components are getting inserted with componentId 0,1,2 .But While trying to reinsert, increment operation starts at 0 itself and a 'MySQLIntegrityConstraintViolationException' is thrown.
I have two guess about this case:

1.increment generator is starting at initial position for every execution
2.insertions in Components table are not being commited.
Can anyone help me figure out the real problem
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic