From 7a7d3a3e839ff4995974e1f823a63cd78b02828b Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 20 Oct 2023 11:55:30 +0200 Subject: [PATCH] Clarify not to map backreferences and key columns. Closes #504 --- src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc b/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc index f3e3851e..d588edb8 100644 --- a/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc +++ b/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc @@ -72,6 +72,7 @@ Alternatively you may annotate the attribute with `@MappedCollection(idColumn="y Specifying a key column for a `Set` has no effect. + [[mapping.usage.annotations]] === Mapping Annotation Overview @@ -128,6 +129,9 @@ p1.bestFriend = AggregateReference.to(p2.id); ---- +You should not include attributes in your entities to hold the actual value of a back reference, nor of the key column of maps or lists. +If you want these value to be available in your domain model we recommend to do this in a `AfterConvertCallback` and store the values in transient values. + * Types for which you registered suitable [[jdbc.custom-converters, custom conversions]]. :mapped-collection: true