Browse Source

DATAJDBC-520 - Polishing.

Put the parts about references back.

Original pull request: #206.
1.1.x
Jens Schauder 6 years ago
parent
commit
ddcb914513
No known key found for this signature in database
GPG Key ID: 996B1389BA0721C3
  1. 3
      src/main/asciidoc/jdbc.adoc

3
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. `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: 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:

Loading…
Cancel
Save