From f1cdee26124263d9aa1a8b47f78aade895a03582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Ueno?= Date: Fri, 13 Jan 2017 12:44:53 -0200 Subject: [PATCH] HHH-11408 - Fixing typos in documentation --- .../chapters/domain/associations.adoc | 4 ++-- .../chapters/domain/collections.adoc | 6 +++--- .../chapters/domain/identifiers.adoc | 20 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc index 52448532c1..1acaec2e19 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/associations.adoc @@ -213,7 +213,7 @@ include::{extrasdir}/associations-one-to-one-bidirectional-lifecycle-example.sql ==== When using a bidirectional `@OneToOne` association, Hibernate enforces the unique constraint upon fetching the child-side. -If there are more than one children associated with the same parent, Hibernate will throw a constraint violation exception. +If there are more than one children associated with the same parent, Hibernate will throw a `org.hibernate.exception.ConstraintViolationException`. Continuing the previous example, when adding another `PhoneDetails`, Hibernate validates the uniqueness constraint when reloading the `Phone` object. [[associations-one-to-one-bidirectional-constraint-example]] @@ -362,7 +362,7 @@ include::{extrasdir}/associations-many-to-many-bidirectional-with-link-entity-ex ---- ==== -Both the `Person` and the `Address` have a` mappedBy` `@OneToMany` side, while the `PersonAddress` owns the `person` and the `address` `@ManyToOne` associations. +Both the `Person` and the `Address` have a `mappedBy` `@OneToMany` side, while the `PersonAddress` owns the `person` and the `address` `@ManyToOne` associations. Because this mapping is formed out of two bidirectional associations, the helper methods are even more relevant. [NOTE] diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc index 3eeaf9096b..0bde60d9d7 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/collections.adoc @@ -427,7 +427,7 @@ include::{sourcedir}/BidirectionalSetTest.java[tags=collections-bidirectional-se ==== Sorted sets For sorted sets, the entity mapping must use the `SortedSet` interface instead. -According to the `SortedSet` contract, all elements must implement the comparable interface and therefore provide the sorting logic. +According to the `SortedSet` contract, all elements must implement the `Comparable` interface and therefore provide the sorting logic. [[collections-unidirectional-sorted-set]] ===== Unidirectional sorted sets @@ -544,7 +544,7 @@ include::{extrasdir}/collections-map-unidirectional-example.sql[] [[collections-map-bidirectional]] ===== Bidirectional maps -Like most bidirectional associations, this relationship is owned by the child-side while the parent is the inverse side abd can propagate its own state transitions to the child entities. +Like most bidirectional associations, this relationship is owned by the child-side while the parent is the inverse side and can propagate its own state transitions to the child entities. In the following example, you can see that `@MapKeyEnumerated` was used so that the `Phone` enumeration becomes the map key. [[collections-map-bidirectional-example]] @@ -630,7 +630,7 @@ See the Hibernate Integrations Guide for more details on developing custom value [[collections-custom]] ==== Custom collection types -If you wish to use other collection types than `List`, `Set` or ``Map`, like `Queue` for instance, +If you wish to use other collection types than `List`, `Set` or `Map`, like `Queue` for instance, you have to use a custom collection type, as illustrated by the following example: [[collections-custom-collection-mapping-example]] diff --git a/documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc b/documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc index 5fe0e816f4..c3ea9b46cc 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc @@ -144,7 +144,7 @@ include::{extrasdir}/id/IdClass1.java[] ---- ==== -Non-aggregated composite identifiers can also contain ManyToOne attributes as we saw with aggregated ones (still non-portably) +Non-aggregated composite identifiers can also contain ManyToOne attributes as we saw with aggregated ones (still non-portably). .IdClass with ManyToOne ==== @@ -201,7 +201,7 @@ include::{extrasdir}/id/CompositeIdAssociationsQuery.java[] [NOTE] ==== -For discussion of generated values for non-identifier attributes, see <> +For discussion of generated values for non-identifier attributes, see <>. ==== Hibernate supports identifier value generation across a number of different types. @@ -249,10 +249,10 @@ The `IdGeneratorStrategyInterpreter` has two implementations: For implementing database sequence-based identifier value generation Hibernate makes use of its `org.hibernate.id.enhanced.SequenceStyleGenerator` id generator. It is important to note that SequenceStyleGenerator is capable of working against databases that do not support sequences by switching to a table as the underlying backing. -This gives Hibernate a huge degree of portability across databases while still maintaining consistent id generation behavior (versus say choosing between sequence and IDENTITY). +This gives Hibernate a huge degree of portability across databases while still maintaining consistent id generation behavior (versus say choosing between SEQUENCE and IDENTITY). This backing storage is completely transparent to the user. -The preferred (and portable) way to configure this generator is using the JPA-defined javax.persistence.SequenceGenerator annotation. +The preferred (and portable) way to configure this generator is using the JPA-defined `javax.persistence.SequenceGenerator` annotation. The simplest form is to simply request sequence generation; Hibernate will use a single, implicitly-named sequence (`hibernate_sequence`) for all such unnamed definitions. @@ -264,7 +264,7 @@ include::{extrasdir}/id/UnnamedSequence.java[] ---- ==== -Or a specifically named sequence can be requested +Or a specifically named sequence can be requested. .Named sequence ==== @@ -274,7 +274,7 @@ include::{extrasdir}/id/NamedSequence.java[] ---- ==== -Use javax.persistence.SequenceGenerator to specify additional +Use `javax.persistence.SequenceGenerator` to specify additional configuration. .Configured sequence @@ -294,7 +294,7 @@ IdentityGenerator understands 3 different ways that the INSERT-generated value m * If Hibernate believes the JDBC environment supports `java.sql.Statement#getGeneratedKeys`, then that approach will be used for extracting the IDENTITY generated keys. * Otherwise, if `Dialect#supportsInsertSelectIdentity` reports true, Hibernate will use the Dialect specific INSERT+SELECT statement syntax. -* Otherwise, Hibernate will expect that the database supports some form of asking for the most recently inserted IDENTITY value via a separate SQL command as indicated by `Dialect#getIdentitySelectString` +* Otherwise, Hibernate will expect that the database supports some form of asking for the most recently inserted IDENTITY value via a separate SQL command as indicated by `Dialect#getIdentitySelectString`. [IMPORTANT] ==== @@ -356,7 +356,7 @@ include::{extrasdir}/id/UUIDRandom.java[] ==== To specify an alternative generation strategy, we'd have to define some configuration via `@GenericGenerator`. -Here we choose the RFC 4122 version 1 compliant strategy named `org.hibernate.id.uuid.CustomVersionOneStrategy` +Here we choose the RFC 4122 version 1 compliant strategy named `org.hibernate.id.uuid.CustomVersionOneStrategy`. .Implicitly using the random UUID strategy ==== @@ -402,9 +402,9 @@ Applications can also implement and use their own optimizer strategies, as defin ==== [[identifiers-generators-GenericGenerator]] -==== Using @GenericGenerator +==== Using `@GenericGenerator` -@GenericGenerator allows integration of any Hibernate `org.hibernate.id.IdentifierGenerator` implementation, including any of the specific ones discussed here and any custom ones. +`@GenericGenerator` allows integration of any Hibernate `org.hibernate.id.IdentifierGenerator` implementation, including any of the specific ones discussed here and any custom ones. To make use of the pooled or pooled-lo optimizers, the entity mapping must use the https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/annotations/GenericGenerator.html[`@GenericGenerator`] annotation: