Hi,
I was having a hard time to make hibernate update one object on my application. The process ended up in the following exception being thrown:
Code:
...a different object with the same identifier value was already associated with the session
After looking for answers at this forum, I changed my update method to call getHibernateTemplate().merge(object) instead of getHibernateTemplate().saveOrUpdate(object) and now everything works as expected. No exceptions and the update process is executed.
It works and that's ok, but I'm not sure if this is just a workaround to avoid further problems or it is an acceptable solution. Is there someone here who can shed some light on this?
Thanks in advance!