This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate Err:NonUniqueObjectException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Err:NonUniqueObjectException" Watch "Hibernate Err:NonUniqueObjectException" New topic
Author

Hibernate Err:NonUniqueObjectException

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I am using Hiberante to save data to my Database , I am trying to save two objects having the same values into the database, that is i don't mind having duplicates, any time i run the code below


and the exception i am getting is



any Suggestion would be welcome
Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I was able to resolve this by calling clear on the session after each save

getSession().clear
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate Err:NonUniqueObjectException