From 392fc72b315d25adbd8b5220d19e5182f663fb42 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Wed, 1 Jan 2025 18:15:36 +0100 Subject: [PATCH] "subgraph" and "subtype" are words and do not come with hyphens --- design/working/attributes.adoc | 2 +- .../userguide/chapters/fetching/Fetching.adoc | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/design/working/attributes.adoc b/design/working/attributes.adoc index a4ab2799d9..0ec3f171f3 100644 --- a/design/working/attributes.adoc +++ b/design/working/attributes.adoc @@ -24,7 +24,7 @@ class ForeignCustomer extends Customer { ---- The general idea is that the attributes are ordered alphabetically, super attributes first. Subtypes are sorted -depth-first and the attributes are sorted alphabetically within each sub-type. So the order of the attributes +depth-first and the attributes are sorted alphabetically within each subtype. So the order of the attributes depends on where we start. Starting from Customer we have: `[address, name, quota, attr1, attr2, taxId, attr3, attr4, vat]` diff --git a/documentation/src/main/asciidoc/userguide/chapters/fetching/Fetching.adoc b/documentation/src/main/asciidoc/userguide/chapters/fetching/Fetching.adoc index 6fb7bd9c6d..3adc7ed130 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/fetching/Fetching.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/fetching/Fetching.adoc @@ -233,7 +233,7 @@ An EntityGraph is the root of a "load plan" and must correspond to an EntityType [[fetching-strategies-dynamic-fetching-entity-subgraph]] ==== Jakarta Persistence (key) subgraphs -A sub-graph is used to control the fetching of sub-attributes of the AttributeNode it is applied to. +A subgraph is used to control the fetching of sub-attributes of the AttributeNode it is applied to. It is generally defined via the {jpaJavadocUrlPrefix}NamedSubgraph.html[`@NamedSubgraph`] annotation. If we have a `Project` parent entity which has an `employees` child associations, @@ -264,24 +264,24 @@ include::{extrasdir}/fetching-strategies-dynamic-fetching-entity-subgraph-exampl ---- ==== -Specifying a sub-graph is only valid for an attribute (or its "key") whose type is a ManagedType. So +Specifying a subgraph is only valid for an attribute (or its "key") whose type is a ManagedType. So while an EntityGraph must correspond to an EntityType, a Subgraph is legal for any ManagedType. An attribute's key is defined as either: * For a singular attribute, the attribute's type must be an IdentifiableType and that IdentifiableType must - have a composite identifier. The "key sub-graph" is applied to the identifier type. The - non-key sub-graph applies to the attribute's value, which must be a ManagedType. + have a composite identifier. The "key subgraph" is applied to the identifier type. The + non-key subgraph applies to the attribute's value, which must be a ManagedType. * For a plural attribute, the attribute must be a Map and the Map's key value must be a ManagedType. - The "key sub-graph" is applied to the Map's key type. In this case, the non-key sub-graph applies + The "key subgraph" is applied to the Map's key type. In this case, the non-key subgraph applies to the plural attribute's value/element. [[fetching-strategies-dynamic-fetching-entity-subgraph-subtype]] ==== Jakarta Persistence SubGraph sub-typing -SubGraphs can also be sub-type specific. Given an attribute whose value is an inheritance hierarchy, -we can refer to attributes of a specific sub-type using the forms of sub-graph definition that accept -the sub-type Class. +Subgraphs can also be subtype specific. Given an attribute whose value is an inheritance hierarchy, +we can refer to attributes of a specific subtype using the forms of subgraph definition that accept +the subtype Class. [[fetching-strategies-dynamic-fetching-entity-graph-parsing]] @@ -289,7 +289,7 @@ the sub-type Class. Hibernate allows the creation of Jakarta Persistence fetch/load graphs by parsing a textual representation of the graph. Generally speaking, the textual representation of a graph is a comma-separated -list of attribute names, optionally including any sub-graph specifications. +list of attribute names, optionally including any subgraph specifications. `org.hibernate.graph.GraphParser` is the starting point for such parsing operations. [NOTE] @@ -312,7 +312,7 @@ This example actually functions exactly as <