Author: adamw
Date: 2009-11-24 10:36:49 -0500 (Tue, 24 Nov 2009)
New Revision: 18033
Modified:
core/trunk/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml
Log:
HHH-4540:
- updating docs
Modified: core/trunk/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml
===================================================================
---
core/trunk/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml 2009-11-24
15:21:10 UTC (rev 18032)
+++
core/trunk/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml 2009-11-24
15:36:49 UTC (rev 18033)
@@ -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>
@@ -61,6 +61,14 @@
</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
be called when a new revision is created, before persisting the revision entity.
Show replies by date