@@ -193,7 +193,7 @@ choice_name
193
193
194
194
By default the name of each field is the id of the entity, if it can be read
195
195
from the class metadata by an internal id reader. Otherwise the process will
196
- fall back on an incremental integer .
196
+ fall back to using increasing integers .
197
197
198
198
choice_value
199
199
~~~~~~~~~~~~
@@ -203,12 +203,14 @@ choice_value
203
203
204
204
**type **: ``string ``, ``callable `` or :class: `Symfony\\ Component\\ PropertyAccess\\ PropertyPath ` **default **: id
205
205
206
- As for the ``choice_name `` option, ``choice_value `` use the id by default.
206
+ As for the ``choice_name `` option, ``choice_value `` uses the id by default.
207
207
It allows an optimization in the :class: ``Symfony\\ Bridge\\ Doctrine\\ Form\\ ChoiceList\\ Loader\\ DoctrineChoiceLoader` ` which will
208
- only load the ids passed as values while the form submission, preventing all entities,
209
- even with a custom ``query_builder `` to be loaded.
210
- If it can be usefull for API to use an entity property as string value, you
211
- will gain performances by letting this option set by default.
208
+ only load the ids passed as values while the form submission.
209
+ It prevents all non submitted entities to be loaded from the database, even
210
+ when defining the ``query_builder `` option.
211
+ If it may be useful to set this option using an entity's property as string
212
+ value (e.g for some API), you will gain performances by letting this option set
213
+ by default.
212
214
213
215
.. note ::
214
216
0 commit comments