I am new to Evers. I have an Employee Entity (Table Name as IT_Employee with Employee_ID as the Primary Key) and with Envers all the audit changes that are performed on an entity are storing in IT_Employee_hst table.
I am using the below Query to retrieve the Modified History on the Employee Entity.
AuditReader auditReader = AuditReaderFactory.get(getSession());
RevisionType[] revisionTypes = {RevisionType.MOD};
AuditQuery query = auditReader.createQuery().forRevisionsOfEntity(Employee.class, false, true);
query.add(AuditEntity.revisionType().in(revisionTypes));
List returned = query.getResultList();
Question:- The above query fetches all updates for all the Employees .
I wanted to exclude the Last Modified Record for Each Employee (Employee_ID) .Please help me on this.
I think it will be easiest to simply do this in-memory, after executing the query.
Adam