Relative Content

Tag Archive for javahibernatehibernate-envers

Hibernate Envers – how to map custom RevisionEntity columns into audit queries

I have separated the auditing support and the revisions in my solution. It works fine, but I have no idea how to create a query to get all revisions where the audit data is mapped from the REVINFO to the MyEntity in the query result. Like joining the MYENTITY_AUD and the REVINFO on REV for lastModified columns. For created columns it is even more complicated, because it might requires a subquery with REVTYPE = 0.

Hibernate Envers – custom RevisionEntity – how to map records

I have separated the auditing support and revisions in my solution. It works fine, but I have no idea how to create a query to get all revisions where the timestamp and the modifiedBy from REVINFO is mapped into the List<MyEntity> query results. Like joining the MYENTITY_AUD and the REVINFO on REV for lastModified columns. For created columns it is even more complicated, because it might requires a subquery with REVTYPE = 0.