This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.hibernate.NonUniqueObjectException

 
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