From 8855e85040f3dbdbd43a090fe8f0a18a81a4e436 Mon Sep 17 00:00:00 2001 From: Adam Warski Date: Tue, 24 Nov 2009 15:36:49 +0000 Subject: [PATCH] HHH-4540: - updating docs git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18033 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../src/main/docbook/en-US/content/revisionlog.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml b/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml index 88c172da6d..79b6219e95 100644 --- a/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml +++ b/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml @@ -49,7 +49,7 @@ - a long-valued property, annotated with @RevisionTimestamp. Value of + a long- or j.u.Date- valued property, annotated with @RevisionTimestamp. Value of this property will be automatically set by Envers. @@ -60,6 +60,14 @@ org.hibernate.envers.DefaultRevisionEntity, which already has those two properties. + + When using a Date, instead of a long/Long for the revision timestamp, + take care not to use a mapping of the property which will loose precision (for example, using + @Temporal(DATE) 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 + @Temporal(TIMESTAMP). + + To fill the entity with additional data, you'll need to implement the org.jboss.envers.RevisionListener interface. Its newRevision method will