8000 Merge branch '4.4' into 5.0 · symfony/symfony-docs@5cef387 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cef387

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Update associations.rst
2 parents 9e233ec + 8bca82a commit 5cef387

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

doctrine/associations.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ This will generate your new entity class::
6565

6666
// src/Entity/Category.php
6767
namespace App\Entity;
68-
68+
6969
// ...
7070

7171
class Category
@@ -218,7 +218,7 @@ class that will hold these objects:
218218
219219
// src/Entity/Category.php
220220
namespace App\Entity;
221-
221+
222222
// ...
223223
use Doctrine\Common\Collections\ArrayCollection;
224224
use Doctrine\Common\Collections\Collection;
@@ -295,9 +295,9 @@ config.
295295

296296
The code inside ``__construct()`` is important: The ``$products`` property must
297297
be a collection object that implements Doctrine's ``Collection`` interface.
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 it's
300-
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.
301301

302302
Your database is setup! Now, execute the migrations like normal:
303303

@@ -316,7 +316,7 @@ Now you can see this new code in action! Imagine you're inside a controller::
316316

317317
// src/Controller/ProductController.php
318318
namespace App/Controller;
319-
319+
320320
// ...
321321
use App\Entity\Category;
322322
use App\Entity\Product;
@@ -604,3 +604,4 @@ Doctrine's `Association Mapping Documentation`_.
604604
.. _`Association Mapping Documentation`: https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/association-mapping.html
605605
.. _`orphanRemoval`: https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/working-with-associations.html#orphan-removal
606606
.. _`Mastering Doctrine Relations`: https://symfonycasts.com/screencast/doctrine-relations
607+
.. _`ArrayCollection`: https://www.doctrine-project.org/projects/doctrine-collections/en/1.6/index.html

0 commit comments

Comments
 (0)
0