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:
parent
f39550fff1
commit
8855e85040
|
@ -49,7 +49,7 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<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.
|
this property will be automatically set by Envers.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -60,6 +60,14 @@
|
||||||
<literal>org.hibernate.envers.DefaultRevisionEntity</literal>, which already has those two properties.
|
<literal>org.hibernate.envers.DefaultRevisionEntity</literal>, which already has those two properties.
|
||||||
</para>
|
</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>
|
<para>
|
||||||
To fill the entity with additional data, you'll need to implement the
|
To fill the entity with additional data, you'll need to implement the
|
||||||
<literal>org.jboss.envers.RevisionListener</literal> interface. Its newRevision method will
|
<literal>org.jboss.envers.RevisionListener</literal> interface. Its newRevision method will
|
||||||
|
|
Loading…
Reference in New Issue