From ddcb9145136bf43c446814bc535ed47e72920fa8 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Tue, 14 Apr 2020 14:41:20 +0200 Subject: [PATCH] DATAJDBC-520 - Polishing. Put the parts about references back. Original pull request: #206. --- src/main/asciidoc/jdbc.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/asciidoc/jdbc.adoc b/src/main/asciidoc/jdbc.adoc index 0b1a9137b..57795da24 100644 --- a/src/main/asciidoc/jdbc.adoc +++ b/src/main/asciidoc/jdbc.adoc @@ -240,7 +240,8 @@ public class MyEntity { ---- ==== -The {javadoc-base}org/springframework/data/relational/core/mapping/MappedCollection.html[`@MappedCollection`] annotation can be used on Sets, Lists, and Maps. +The {javadoc-base}org/springframework/data/relational/core/mapping/MappedCollection.html[`@MappedCollection`] + annotation can be used on a reference type (one-to-one relationship) or on Sets, Lists, and Maps (one-to-many relationship). `idColumn` element of the annotation provides a custom name for the foreign key column referencing the id column in the other table. In the following example the corresponding table for the `MySubEntity` class has a `NAME` column, and the `CUSTOM_MY_ENTITY_ID_COLUMN_NAME` column of the `MyEntity` id for relationship reasons: