Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why it is inserting the values in the rows again  RSS feed

 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!