We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 95cd2d3 + 6af7fb5 commit ecee317Copy full SHA for ecee317
reference/forms/types/entity.rst
@@ -211,6 +211,14 @@ loading all entities.
211
.. versionadded:: 2.8
212
Returning ``null`` in the Closure was introduced in Symfony 2.8.
213
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
222
Overridden Options
223
------------------
224
0 commit comments