aspose file tools*
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
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
 
Consider Paul's rocket mass heater.
 
subject: Hibernate Err:NonUniqueObjectException