Skip to content

[Form] Call getChoicesForValues() once, to prevent several SQL queries #48342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2022
Merged

[Form] Call getChoicesForValues() once, to prevent several SQL queries #48342

merged 1 commit into from
Dec 9, 2022

Conversation

elementaire
Copy link
Contributor

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

The feature "Keeping valid submitted choices when additional choices are submitted" adds some overload to list the valid choices.

With options set to multiple=true, expanded=false and using an EntityType, it performs several queries, one for each value.

@carsonbot carsonbot added this to the 6.3 milestone Nov 26, 2022
@elementaire elementaire changed the title [Form] Call getChoicesForValues() once, to prevent several SQL queries [Form] Call getChoicesForValues() once, to prevent several SQL queries Nov 26, 2022
Copy link
Member

@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fabpot
Copy link
Member

fabpot commented Dec 9, 2022

Thank you @elementaire.

@fabpot fabpot merged commit 50694f2 into symfony:6.3 Dec 9, 2022
@elementaire elementaire deleted the 6.3-call-getchoicesforvalues branch December 11, 2022 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants