Skip to content

Commit 7a7d3a3

Browse files
committed
Clarify not to map backreferences and key columns.
Closes #504
1 parent 13d4f12 commit 7a7d3a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Alternatively you may annotate the attribute with `@MappedCollection(idColumn="y
7272
Specifying a key column for a `Set` has no effect.
7373

7474

75+
7576
[[mapping.usage.annotations]]
7677
=== Mapping Annotation Overview
7778

@@ -128,6 +129,9 @@ p1.bestFriend = AggregateReference.to(p2.id);
128129
129130
----
130131

132+
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.
133+
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.
134+
131135
* Types for which you registered suitable [[jdbc.custom-converters, custom conversions]].
132136

133137
:mapped-collection: true

0 commit comments

Comments
 (0)