Hi there,
my case is that, i've loaded an object X from DB using hibernateTemplate find by id, then i get some attributes from that object and added it to another object Y from the same type which was also loaded by the same X id, then i tried to saveOrUpdate object Y, hibernate thrown exception 'a different object with the same identifier value was already associated with the session' which means as i think that object X is associated with that attribute in the same session, so Y can't be saved or updated and affect also that attribute
so how can i remove object X from session so it's no more associated to that attribute
i tried to use merge instead of saveOrUpdate and it's working fine, but is it the same as saveOrUpdate, i mean can i depend on it to add new records or update them?