@@ -168,20 +168,25 @@ own a collection of its related ``Product`` objects.
168
168
169
169
.. note ::
170
170
171
- The code in the constructor is important. Rather than being instantiated
171
+ The code in the constructor is important. Rather than being instantiated
172
172
as a traditional ``array ``, the ``$products `` property must be of a type
173
173
that implements Doctrine's ``Collection `` interface. In this case, an
174
174
``ArrayCollection `` object is used. This object looks and acts almost
175
175
*exactly * like an array, but has some added flexibility. If this makes
176
176
you uncomfortable, don't worry. Just imagine that it's an ``array ``
177
177
and you'll be in good shape.
178
178
179
+ .. seealso ::
180
+
181
+ To understand ``inversedBy `` and ``mappedBy `` usage, see Doctrine's
182
+ `Association Updates ` documentation.
183
+
179
184
.. tip ::
180
185
181
- The targetEntity value in the metadata used above can reference any entity
182
- with a valid namespace, not just entities defined in the same namespace. To
183
- relate to an entity defined in a different class or bundle, enter a full
184
- namespace as the targetEntity.
186
+ The targetEntity value in the metadata used above can reference any entity
187
+ with a valid namespace, not just entities defined in the same namespace. To
188
+ relate to an entity defined in a different class or bundle, enter a full
189
+ namespace as the targetEntity.
185
190
186
191
Now that you've added new properties to both the ``Product `` and ``Category ``
187
192
classes, tell Doctrine to generate the missing getter and setter methods for you:
@@ -407,3 +412,4 @@ Doctrine's `Association Mapping Documentation`_.
407
412
statement, which *imports * the ``ORM `` annotations prefix.
408
413
409
414
.. _`Association Mapping Documentation` : http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html
415
+ .. _`Association Updates` : http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html
0 commit comments