Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!