Created
February 27, 2013 09:55
-
-
Save dagvadorj/5046762 to your computer and use it in GitHub Desktop.
Getting entity change set in EclipseLink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UnitOfWork works = ((JpaEntityManager) em.getDelegate()) | |
.getUnitOfWork(); | |
UnitOfWorkChangeSet changes = works.getCurrentChanges(); | |
ObjectChangeSet objectChangeSet = changes | |
.getObjectChangeSetForClone(someEntityInstance); | |
if (objectChangeSet != null) { | |
final List<ChangeRecord> changedProperties = objectChangeSet | |
.getChanges(); | |
for (final ChangeRecord property : changedProperties) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment