I have a JPA program where EclipseLink is the Persistence provider. When I merge an user entity, change its ID, and try to merge the same user instance again, an error is thrown
It seems to be an bug of EclipseLink. I have changed the persistence provider from EclipseLink to Hibernate:
from
org.eclipse.persistence.jpa.PersistenceProvider
to
org.hibernate.ejb.HibernatePersistence
No error has been thrown.
The version of EclipseLink is 2.3.2. (which is shipped with the latest Glassfish application server 3.1.2).
The version of hibernate is, as of now the latest, 4.1.7.