1
0
mirror of synced 2025-02-09 00:39:25 +03:00

Merge pull request #6690 from bitwombat/issue_6686

Clarify association mapping language
This commit is contained in:
Marco Pivetta 2017-09-11 08:51:50 +02:00 committed by GitHub
commit bf8e27b422
2 changed files with 3 additions and 3 deletions

View File

@ -268,7 +268,7 @@ Generated MySQL Schema:
) ENGINE = InnoDB; ) ENGINE = InnoDB;
ALTER TABLE Cart ADD FOREIGN KEY (customer_id) REFERENCES Customer(id); ALTER TABLE Cart ADD FOREIGN KEY (customer_id) REFERENCES Customer(id);
We had a choice of sides on which to place the ``mappedBy`` attribute. Because it We had a choice of sides on which to place the ``inversedBy`` attribute. Because it
is on the ``Cart``, that is the owning side of the relation, and thus holds the is on the ``Cart``, that is the owning side of the relation, and thus holds the
foreign key. foreign key.

View File

@ -15,10 +15,10 @@ Bidirectional Associations
The following rules apply to **bidirectional** associations: The following rules apply to **bidirectional** associations:
- The inverse side has to use the ``mappedBy`` attribute of the OneToOne, - The inverse side has to have the ``mappedBy`` attribute of the OneToOne,
OneToMany, or ManyToMany mapping declaration. The mappedBy OneToMany, or ManyToMany mapping declaration. The mappedBy
attribute contains the name of the association-field on the owning side. attribute contains the name of the association-field on the owning side.
- The owning side has to use the ``inversedBy`` attribute of the - The owning side has to have the ``inversedBy`` attribute of the
OneToOne, ManyToOne, or ManyToMany mapping declaration. OneToOne, ManyToOne, or ManyToMany mapping declaration.
The inversedBy attribute contains the name of the association-field The inversedBy attribute contains the name of the association-field
on the inverse-side. on the inverse-side.