Merge an entity, change its id, merge again, cause “mapped to a primary key column in the database. Updates are not allowed” error

前端 未结 4 1224
一整个雨季
一整个雨季 2021-02-14 12:22

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

4条回答
  •  春和景丽
    2021-02-14 12:54

    Try in persistence.xml as per http://blogs.nologin.es/rickyepoderi/index.php?/archives/95-Weaving-Problem-in-EclipseLink.html

提交回复
热议问题