HHH-4540:

- updating docs

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18033 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Adam Warski 2009-11-24 15:36:49 +00:00
parent f39550fff1
commit 8855e85040
1 changed files with 9 additions and 1 deletions

View File

@ -49,7 +49,7 @@
</listitem>
<listitem>
<para>
a long-valued property, annotated with <literal>@RevisionTimestamp</literal>. Value of
a long- or j.u.Date- valued property, annotated with <literal>@RevisionTimestamp</literal>. Value of
this property will be automatically set by Envers.
</para>
</listitem>
@ -60,6 +60,14 @@
<literal>org.hibernate.envers.DefaultRevisionEntity</literal>, which already has those two properties.
</para>
<para>
When using a <literal>Date</literal>, instead of a <literal>long/Long</literal> for the revision timestamp,
take care not to use a mapping of the property which will loose precision (for example, using
<literal>@Temporal(DATE)</literal> is wrong, as it doesn't store the time information, so many of your
revisions will appear to happen at exactly the same time). A good choice is a
<literal>@Temporal(TIMESTAMP)</literal>.
</para>
<para>
To fill the entity with additional data, you'll need to implement the
<literal>org.jboss.envers.RevisionListener</literal> interface. Its newRevision method will