add a couple of explanatory sentences to derived id section of doc

This commit is contained in:
Gavin King 2023-09-11 17:09:25 +02:00
parent e099b06c6d
commit 1816940b21
1 changed files with 3 additions and 1 deletions

View File

@ -863,10 +863,12 @@ class Parent {
}
----
The `parentId` field holds the primary key of the `Parent` table, which will also form part of the composite primary key of every `Child` belonging to the `Parent`.
[discrete]
==== First way
In the first, slightly simpler approach, we define an `@IdClass`:
In the first, slightly simpler approach, we define an `@IdClass` to represent the primary key of `Child`:
[source,java]
----