Skip to content

Commit 8e196bf

Browse files
committed
Merge pull request #2428 from joelclermont/issue_1566
add notes on collection and entity field types
2 parents 0065bbb + 97dd87c commit 8e196bf

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

reference/forms/types/collection.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ forms, which is useful when creating forms that expose one-to-many relationships
2929
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType` |
3030
+-------------+-----------------------------------------------------------------------------+
3131

32+
.. note::
33+
34+
If you are working with a collection of Doctrine entities, pay special
35+
attention to the `allow_add`_, `allow_delete`_ and `by_reference`_ options.
36+
You can also see a complete example in the cookbook article
37+
:doc:`/cookbook/form/form_collections`.
38+
3239
Basic Usage
3340
-----------
3441

reference/forms/types/entity.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ These options inherit from the :doc:`choice</reference/forms/types/choice>` type
115115

116116
.. include:: /reference/forms/types/options/multiple.rst.inc
117117

118+
.. note::
119+
120+
If you are working with a collection of Doctrine entities, it will be helpful
121+
to read the documention for the :doc:`/reference/forms/types/collection`
122+
as well. In addition, there is a complete example in the cookbook article
123+
:doc:`/cookbook/form/form_collections`.
124+
118125
.. include:: /reference/forms/types/options/expanded.rst.inc
119126

120127
.. include:: /reference/forms/types/options/preferred_choices.rst.inc

0 commit comments

Comments
 (0)