Hi
When I do a save() on an object that is identified with a compound key, I get
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session
My main task is to find out when this original object is getting into the session because as far as I know, it's a clean session. So first question: is there an easy way to find out when it went into the session?
Also, for debugging purposes, I'm using this code
Code:
if(getHibernateTemplate().getSessionFactory().getCurrentSession().contains(testObject)) {
log.debug("Already contains this object");
}
getHibernateTemplate().save(test);
I never drop into the log statement, but then the save() statement throws the NUO Exception. How is this possible?
Thanks!