Retrieving Modified Properties Through Revision

I use Hibernate Envers to check my objects and properties ( org.hibernate.envers.global_with_modified_flag=true). This seems to work, but now I would like to get all the properties of a specific entity that changed during this revision, compared to the previous one. As a bonus, it would be nice to get a set of changes from one version to another. So far I get only modified objects:

List<Object> modifiedClassesAtRevision = getAuditReader().getCrossTypeRevisionChangesReader().findEntities(revision, RevisionType.MOD)
Object modifiedObject = modifiedClassesAtRevision.get(0);

Now, since I don't want to create comparison methods for all objects in Java, is there a way to get the modified properties of this revision? Something along the lines

List<String> modifiedProperties = getAuditReader().getModifiedProperties(modifiedObject, revision);

it would be nice to have - but maybe I'm just too stupid to find such a function.

+5
source share

All Articles