You can reference the SO question here: http://stackoverflow.com/questions/13532087/can-hibernate-envers-return-the-latest-revision-of-all-entities-of-a-specific-ty/13545329#13545329
The idea would be to add a specific capability to the .max() and .min() AggregatedAuditExpressions such that the where clause could reference the Parent Id. For example, the sub-select would look something like:
(select max(project_a2_.REV) from MYSCHEMA.project_AUD project_a2_
where project_a2_.id=project_a0_.id)
While that is the immediate need, more generally one could envision extensions such that a variety of where clause enhancements are supported....
|