This content has been marked as final.
Show 2 replies
-
1. Re: How to obtain revision number of current transaction
adamw Oct 23, 2009 10:51 AM (in response to scatudal)Hello,
this was introduced in Envers 1.2.1: http://www.warski.org/blog/?p=96
Adam -
2. Re: How to obtain revision number of current transaction
scatudal Oct 23, 2009 10:52 AM (in response to scatudal)Sorry to have bothered you, found it. On the AuditReader, there is a method named getCurrentRevision(). I had seen this method, but what threw me off is the fact that you need to specify the class you use for your revision info.
The following will get you the current revision to which any entries in the audit tables will be bound:RevisionEntry revision = AuditReaderFactory.get( entityManager ) .getCurrentRevision( RevisionEntry.class, true );