Hello,
I am using hibernate-envers 5.5.0.Final with:
- audit_strategy: org.hibernate.envers.strategy.ValidityAuditStrategy
- @Audited(withModifiedFlag=true)
The audit tables are well created and fed. I can see the field revend which references the revinfo
table and marks the last revision for which this entity snapshot was still valid.
I am using the following code to retrieve details about the revisions for a given class.
var query = this.getAuditReader().createQuery().forRevisionsOfEntityWithChanges(classInstance, true);
var results = query.getResultList();
for (var res : results) {
var result = (Object[]) res;
Object instance = result[0];
RevisionEntityImpl revEntity = (RevisionEntityImpl) result[1];
RevisionType revType = (RevisionType) result[2];
Set<String> changedProperties = (Set<String>) result[3];
The select query generated by hibernate mentions the fields “revend” but
I am unable to see it in the objects returned by the API.
Where to find it?
Thanks for your help.