Skip to content

Instantly share code, notes, and snippets.

@dagvadorj
Created February 27, 2013 09:55
Show Gist options
  • Save dagvadorj/5046762 to your computer and use it in GitHub Desktop.
Save dagvadorj/5046762 to your computer and use it in GitHub Desktop.
Getting entity change set in EclipseLink
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