1
0
mirror of synced 2025-03-05 20:36:15 +03:00

Clarify association mapping language

- 5.3 was wrong - should really be 'inversedBy'
- 11.1 - change 'use' to 'have' for consistency.  A class has an attribute.

- See https://github.com/doctrine/doctrine2/issues/6686
This commit is contained in:
Greg Bell 2017-09-06 07:58:34 +10:00
parent 74c83f3cec
commit c429f1c38b
2 changed files with 3 additions and 3 deletions

View File

@ -268,7 +268,7 @@ Generated MySQL Schema:
) ENGINE = InnoDB;
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
foreign key.

View File

@ -15,10 +15,10 @@ 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
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.
The inversedBy attribute contains the name of the association-field
on the inverse-side.