Joined: Fri Jun 04, 2010 8:57 pm Posts: 19
|
I am trying to merge an entity named Donor. The merge throws "org.hibernate.PersistentObjectException: detached entity passed to persist: Donor". Here is the sequence of steps that I am following
1. Read the Donor Entity using em.find(). Transaction is terminated and Donor is detached. 2. Update the detached Donor Entity including any relationships. Some relationships require other entities that are not available at this time. 3. Begin transaction. Update the detached Donor entity for relationships that were left out in step 2 above. Then merge the Donor entity. The em.merge(Donor) throws the above said PersistenceException.
I am unsure as to why the merge operation is trying to persist the Donor entity instead of merging.
regards, Nirvan.
|
|