diff --git a/documentation/src/main/docbook/manual/en-US/content/basic_mapping.xml b/documentation/src/main/docbook/manual/en-US/content/basic_mapping.xml index 42d35ba610..b0cb27de71 100644 --- a/documentation/src/main/docbook/manual/en-US/content/basic_mapping.xml +++ b/documentation/src/main/docbook/manual/en-US/content/basic_mapping.xml @@ -245,7 +245,7 @@ public class Flight implements Serializable { @Entity.name lets you define the shortcut name - of the entity you can used in JP-QL and HQL queries. It defaults to the + of the entity you can use in JP-QL and HQL queries. It defaults to the unqualified class name of the class. Hibernate goes beyond the JPA specification and provide additional @@ -938,7 +938,7 @@ class UserId implements Serializable { <class name="Customer"> <composite-id name="id" class="CustomerId"> <key-property name="firstName" column="userfirstname_fk"/> - <key-property name="lastName" column="userfirstname_fk"/> + <key-property name="lastName" column="userlastname_fk"/> <key-property name="customerNumber"/> </composite-id> @@ -1081,7 +1081,7 @@ class UserId implements Serializable {
- Multiple id properties with with a dedicated identifier + <title>Multiple id properties with a dedicated identifier type @IdClass on an entity points to the @@ -2600,7 +2600,7 @@ public class Order { @Embedded private Address address; public Address getAddress() { return address; } - public void setAddress() { this.address = address; } + public void setAddress(Address address) { this.address = address; } } @Entity @@ -2611,7 +2611,7 @@ public class User { private Address address; @Embedded public Address getAddress() { return address; } - public void setAddress() { this.address = address; } + public void setAddress(Address address) { this.address = address; } } @Embeddable @@ -2619,7 +2619,7 @@ public class User { public class Address { private String street1; public String getStreet1() { return street1; } - public void setStreet1() { this.street1 = street1; } + public void setStreet1(String street1) { this.street1 = street1; } private hashCode; //not persistent } @@ -2637,7 +2637,7 @@ public class Order { @Access(AccessType.PROPERTY) public String getOrderNumber() { return userId + ":" + orderId; } - public void setOrderNumber() { this.userId = ...; this.orderId = ...; } + public void setOrderNumber(String userId, String orderId) { this.userId = userId; this.orderId = orderId; } } In this example, the default access type is @@ -3136,10 +3136,10 @@ public class Country implements Serializable { Address homeAddress; Hibernate Annotations supports something that is not explicitly - supported by the JPA specification. You can annotate a embedded object + supported by the JPA specification. You can annotate an embedded object with the @MappedSuperclass annotation to make the superclass properties persistent (see - @MappedSuperclass for more informations). + @MappedSuperclass for more information). You can also use association annotations in an embeddable object (ie @OneToOne, @ManyToOne, @@ -3857,7 +3857,7 @@ public class Plane extends FlyingObject { Mapping one entity to several tables While not recommended for a fresh schema, some legacy databases - force your to map a single entity on several tables. + force you to map a single entity on several tables. Using the @SecondaryTable or @SecondaryTables class level annotations. To @@ -4088,9 +4088,9 @@ public class Cat implements Serializable {
- Mapping one to one and one to many associations + Mapping one to one and many to one associations - To link one entity to an other, you need to map the association + To link one entity to another, you need to map the association property as a to one association. In the relational model, you can either use a foreign key or an association table, or (a bit less common) share the same primary key value between the two entities. @@ -4308,7 +4308,7 @@ public class Child { alter table Child add constraint FK_PARENT foreign key (parent_id) references Parent - Sometimes, you want to link one entity to an other not by the + Sometimes, you want to link one entity to another not by the target entity primary key but by a different unique key. You can achieve that by referencing the unique key column(s) in @JoinColumn.referenceColumnName. @@ -5874,7 +5874,7 @@ class CreditCard { to define either of these rules. - If a property uses more that one column, you must use the + If a property uses more than one column, you must use the forColumn attribute to specify which column, the expressions are targeting. diff --git a/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml b/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml index 3c63896315..c7db5af674 100644 --- a/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml +++ b/documentation/src/main/docbook/manual/en-US/content/persistent_classes.xml @@ -131,7 +131,7 @@ private float weight; Historically this was considered option. While still not (yet) enforced, this should be considered - a deprecated feature as it will be completely required to provide a identifier property in an + a deprecated feature as it will be completely required to provide an identifier property in an upcoming release.