diff --git a/documentation/envers/src/main/docbook/en-US/content/exceptions.xml b/documentation/envers/src/main/docbook/en-US/content/exceptions.xml index 2638deda63..e976e7b300 100644 --- a/documentation/envers/src/main/docbook/en-US/content/exceptions.xml +++ b/documentation/envers/src/main/docbook/en-US/content/exceptions.xml @@ -90,6 +90,22 @@ @JoinTable. + + One special case are relations mapped with @OneToMany+@JoinColumn on + the one side, and @ManyToOne+@JoinColumn(insertable=false, updatable=false) + on the many side. + Such relations are in fact bidirectional, but the owning side is the collection (see alse + here). + + + To properly audit such relations with Envers, you can use the @AuditMappedBy annotation. + It enables you to specify the reverse property (using the mappedBy element). In case + of indexed collections, the index column must also be mapped in the referenced entity (using + @Column(insertable=false, updatable=false), and specified using + positionMappedBy. This annotation will affect only the way + Envers works. Please note that the annotation is experimental and may change in the future. + +