@@ -65,7 +65,7 @@ This will generate your new entity class::
65
65
66
66
// src/Entity/Category.php
67
67
namespace App\Entity;
68
-
68
+
69
69
// ...
70
70
71
71
class Category
@@ -218,7 +218,7 @@ class that will hold these objects:
218
218
219
219
// src/Entity/Category.php
220
220
namespace App\Entity;
221
-
221
+
222
222
// ...
223
223
use Doctrine\Common\Collections\ArrayCollection;
224
224
use Doctrine\Common\Collections\Collection;
@@ -295,9 +295,9 @@ config.
295
295
296
296
The code inside ``__construct() `` is important: The ``$products `` property must
297
297
be a collection object that implements Doctrine's ``Collection `` interface.
298
- In this case, an [`` ArrayCollection ``](` Doctrine_Collections `_) object is used.
299
- This looks and acts almost *exactly * like an array, but has some added flexibility.
300
- Just imagine that it is an ``array `` and you'll be in good shape.
298
+ In this case, an ` ArrayCollection `_ object is used. This looks and acts almost
299
+ *exactly * like an array, but has some added flexibility. Just imagine that
300
+ it is an ``array `` and you'll be in good shape.
301
301
302
302
Your database is setup! Now, execute the migrations like normal:
303
303
@@ -316,7 +316,7 @@ Now you can see this new code in action! Imagine you're inside a controller::
316
316
317
317
// src/Controller/ProductController.php
318
318
namespace App/Controller;
319
-
319
+
320
320
// ...
321
321
use App\Entity\Category;
322
322
use App\Entity\Product;
@@ -604,4 +604,4 @@ Doctrine's `Association Mapping Documentation`_.
604
604
.. _`Association Mapping Documentation` : https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/association-mapping.html
605
605
.. _`orphanRemoval` : https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/working-with-associations.html#orphan-removal
606
606
.. _`Mastering Doctrine Relations` : https://symfonycasts.com/screencast/doctrine-relations
607
- .. _`Doctrine_Collections ` : https://www.doctrine-project.org/projects/doctrine-collections/en/1.6/index.html
607
+ .. _`ArrayCollection ` : https://www.doctrine-project.org/projects/doctrine-collections/en/1.6/index.html
0 commit comments