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

why it is inserting the values in the rows again

 
rashmi kiran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything is all riht in this program only problme is that , it is in the vserting values again if i run the program again.
why primary key is not working here.


 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Everything is all riht in this program only problme is that , it is in the vserting values again if i run the program again.
why primary key is not working here.

You are using a generator primary key generation stategy and trying to assign a primary key to your object. That's not going to work. Use one or the other not both.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic