8000 Merge branch '2.7' into 2.8 · symfony/symfony-docs@ecee317 · GitHub
[go: up one dir, main page]

Skip to content

Commit ecee317

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [#7220] some minor tweaks Update 'query_builder' option
2 parents 95cd2d3 + 6af7fb5 commit ecee317

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

reference/forms/types/entity.rst

Lines changed: 8 additions & 0 deletions
212
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,14 @@ loading all entities.
211211
.. versionadded:: 2.8
212
Returning ``null`` in the Closure was introduced in Symfony 2.8.
213213

214+
.. caution::
215+
216+
  The entity used in the ``FROM`` clause of the `query_builder`_ option
217+
will always be validated against the class which you have specified with
218+
the form's `class`_ option. If you return another entity instead of the
219+
one used in your ``FROM`` clause (for instance if you return an entity
220+
from a joined table), it will break validation.
221+
   
214222
Overridden Options
215223
------------------
216224

0 commit comments

Comments
 (0)
0