You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something is not right with this solution. Coming from ux's autocomplete. Currently we are facing a problem that doctrine choice loader does an extra query without any criteria and tries to load 200k rows from our db before the autocomplete queries with criteria in this order:
SELECT ... FROM companies c0_
SELECT COUNT(*) AS dctrn_count FROM (SELECT DISTINCT id_32 FROM (SELECT ... FROM companies c0_ WHERE c0_.supplier = ? ORDER BY c0_.created_at DESC) dctrn_result) dctrn_table
SELECT DISTINCT id_32 FROM (SELECT DISTINCT id_32, created_at_30 FROM (SELECT ... FROM companies c0_ WHERE c0_.supplier = ?) dctrn_result_inner ORDER BY created_at_30 DESC) dctrn_result LIMIT 25
SELECT ... FROM companies c0_ WHERE c0_.supplier = ? AND c0_.id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ORDER BY c0_.created_at DESC
Edit: okay, found the cause - autocomplete allows to configure filter_query which allows to query choices based on the user entered value, but then the query_builder is not configured and DoctrineChoiceLoader loads everything, so fix should be in symfony/ux
The text was updated successfully, but these errors were encountered:
I gave already the details. How I supposed to load autocomplete when it tries to load all rows from db? When not using in live component, it renders properly without queries, but querying tries to load everything. And in live component if you dynamically add autocomplete to the form it does the same.
Previous solution worked when Autocomplete was not extending EntityType, so we need to find a solution how to avoid loading everything.
cross posting symfony/symfony#52503 (comment)
Something is not right with this solution. Coming from ux's autocomplete. Currently we are facing a problem that doctrine choice loader does an extra query without any criteria and tries to load 200k rows from our db before the autocomplete queries with criteria in this order:
Backtrace for the first query:
Edit: okay, found the cause - autocomplete allows to configure
filter_query
which allows to query choices based on the user entered value, but then the query_builder is not configured and DoctrineChoiceLoader loads everything, so fix should be in symfony/uxThe text was updated successfully, but these errors were encountered: