Author: adamw
Date: 2009-12-16 08:05:17 -0500 (Wed, 16 Dec 2009)
New Revision: 18238
Modified:
core/trunk/documentation/envers/src/main/docbook/en-US/content/exceptions.xml
Log:
HHH-4694:
- updating docs
Modified: core/trunk/documentation/envers/src/main/docbook/en-US/content/exceptions.xml
===================================================================
---
core/trunk/documentation/envers/src/main/docbook/en-US/content/exceptions.xml 2009-12-16
11:30:19 UTC (rev 18237)
+++
core/trunk/documentation/envers/src/main/docbook/en-US/content/exceptions.xml 2009-12-16
13:05:17 UTC (rev 18238)
@@ -90,6 +90,22 @@
<literal>@JoinTable</literal>.
</para>
+ <para>
+ One special case are relations mapped with
<literal>@OneToMany</literal>+<literal>@JoinColumn</literal> on
+ the one side, and
<literal>@ManyToOne</literal>+<literal>@JoinColumn(insertable=false,
updatable=false</literal>)
+ on the many side.
+ Such relations are in fact bidirectional, but the owning side is the
collection (see alse
+ <ulink
url="http://docs.jboss.org/hibernate/stable/annotations/reference/en...>).
+ </para>
+ <para>
+ To properly audit such relations with Envers, you can use the
<literal>@AuditMappedBy</literal> annotation.
+ It enables you to specify the reverse property (using the
<literal>mappedBy</literal> element). In case
+ of indexed collections, the index column must also be mapped in the
referenced entity (using
+ <literal>@Column(insertable=false, updatable=false)</literal>,
and specified using
+ <literal>positionMappedBy</literal>. This annotation will affect
only the way
+ Envers works. Please note that the annotation is experimental and may change
in the future.
+ </para>
+
</sect1>
</chapter>