From c429f1c38b029b19ed2cbb686c1414880fc0659c Mon Sep 17 00:00:00 2001 From: Greg Bell Date: Wed, 6 Sep 2017 07:58:34 +1000 Subject: [PATCH] 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 --- docs/en/reference/association-mapping.rst | 2 +- docs/en/reference/unitofwork-associations.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/reference/association-mapping.rst b/docs/en/reference/association-mapping.rst index ca3b02f9e..fd791a0f3 100644 --- a/docs/en/reference/association-mapping.rst +++ b/docs/en/reference/association-mapping.rst @@ -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. diff --git a/docs/en/reference/unitofwork-associations.rst b/docs/en/reference/unitofwork-associations.rst index da3cc9dc8..c9ccf73fc 100644 --- a/docs/en/reference/unitofwork-associations.rst +++ b/docs/en/reference/unitofwork-associations.rst @@ -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.