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

org.hibernate.NonUniqueObjectException  RSS feed

 
Singh Harmeet
Ranch Hand
Posts: 115
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i was try to generate the org.hibernate.NonUniqueObjectException exception , but there is not exception generated . there is follwing code
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot have 2 objects with the same persistent id in the context at the same time or you get this exception. In your example this does not happen.

Here is a blog that explains it a bit
http://kousikraj.wordpress.com/2010/12/31/hibernate-non-unique-object-exception/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!