HHH-3823:

- updating documentation

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16486 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Adam Warski 2009-04-30 07:42:39 +00:00
parent 04802d5c26
commit 5a9becf04a
1 changed files with 11 additions and 0 deletions

View File

@ -69,6 +69,17 @@
<literal>@RevisionEntity</literal> annotation.
</para>
<para>
Alternatively, you can use the <literal>getCurrentRevision</literal> method of the
<literal>AuditReader</literal> interface to obtain the current revision, and fill it with desired information.
The method has a <literal>persist</literal> parameter specifying, if the revision entity should be persisted
before returning. If set to <literal>true</literal>, the revision number will be available in the returned
revision entity (as it is normally generated by the database), but the revision entity will be persisted
regardless of wheter there are any audited entities changed. If set to <literal>false</literal>, the revision
number will be <literal>null</literal>, but the revision entity will be persisted only if some audited entities
have changed.
</para>
<para>
A simplest example of a revisions entity, which with each revision associates the
username of the user making the change is: