Hello,
I must be missing something obvious; however I am struggling to find an answer to a problem I am having with envers.
Let's say that I have entity class called MyObject that is audited using envers.
If I get the current copy of an instance of MyObject doing something like:
Code:
Session session = sessionFactory.getCurrentSession();
MyObject myobject1 = (MyObject) session.get(MyObject.class, 1234);
And I get an historical copy (from revision 2) of the same instance:
Code:
Session session = sessionFactory.getCurrentSession();
AuditReader reader = AuditReaderFactory.get(session);
MyObject myobject2 = reader.find(MyObject.class, 1234, 1);
How would I know that myobject1 was the current copy and myobject2 was from revsion 2?