You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EntityManager lock overrides changes done to a managed entity
If using EntityManager#lock with a managed entity with LockModeType.PESSIMISTIC_WRITE all
previous changes to this managed entity (by merge or setters) are lost.
Expected behavior
Lock should not override content already changed in the managed entity (assertion in above code should not fail).
Additional context
See class TestBug.java in branch "bug-entitymanager-lock" in repository git@github.com:vseibt/eclipselink-jpa-testcase-202402.git
Note
Test project in the above repo was created using mvn archetype:generate -DarchetypeGroupId=org.eclipse.persistence -DarchetypeArtifactId=org.eclipse.persistence.bug.jpa-archetype -DarchetypeVersion=5.0.0-SNAPSHOT -DgroupId=eclipselink.bug.testcase -DartifactId=jpa-testcase
like suggested.
Unfortunately current version of this plugin does not have parameters for groupId and artifactId, leading to group id and artifact id from the archetype being used.
The text was updated successfully, but these errors were encountered:
EntityManager lock overrides changes done to a managed entity
If using EntityManager#lock with a managed entity with LockModeType.PESSIMISTIC_WRITE all
previous changes to this managed entity (by merge or setters) are lost.
To Reproduce
Excerpt from test case
Assertion fails.
Expected behavior
Lock should not override content already changed in the managed entity (assertion in above code should not fail).
Additional context
See class
TestBug.java
in branch "bug-entitymanager-lock" in repository git@github.com:vseibt/eclipselink-jpa-testcase-202402.gitNote
Test project in the above repo was created using
mvn archetype:generate -DarchetypeGroupId=org.eclipse.persistence -DarchetypeArtifactId=org.eclipse.persistence.bug.jpa-archetype -DarchetypeVersion=5.0.0-SNAPSHOT -DgroupId=eclipselink.bug.testcase -DartifactId=jpa-testcase
like suggested.
Unfortunately current version of this plugin does not have parameters for
groupId
andartifactId
, leading to group id and artifact id from the archetype being used.The text was updated successfully, but these errors were encountered: