From d28ec8d94f3adc2c92155a7fd95d4ca91b9dcc6d Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Mon, 25 Nov 2024 13:20:06 +0100 Subject: [PATCH] Fix reference to custom converters. The reference was both broken and somehow got moved to the wrong place. Closes #1949 --- src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc b/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc index e46a42e73..8bf7dd86c 100644 --- a/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc +++ b/src/main/antora/modules/ROOT/pages/jdbc/mapping.adoc @@ -66,11 +66,12 @@ The table of the referenced entity is expected to have an additional column with The table of the referenced entity is expected to have two additional columns: One named based on the referencing entity for the foreign key (see <>) and one with the same name and an additional `_key` suffix for the map key. * `List` is mapped as a `Map`. The same additional columns are expected and the names used can be customized in the same way. - ++ For `List`, `Set`, and `Map` naming of the back reference can be controlled by implementing `NamingStrategy.getReverseColumnName(RelationalPersistentEntity owner)` and `NamingStrategy.getKeyColumn(RelationalPersistentProperty property)`, respectively. Alternatively you may annotate the attribute with `@MappedCollection(idColumn="your_column_name", keyColumn="your_key_column_name")`. Specifying a key column for a `Set` has no effect. +* Types for which you registered suitable xref:#mapping.explicit.converters[custom converters]. [[mapping.usage.annotations]] @@ -132,8 +133,6 @@ 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 :embedded-entities: true include::partial$mapping.adoc[]