-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] ORMQueryBuilderLoader::getEntitiesByIds executing query despite that Entity is already loaded #57780
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
Comments
Can you create a small example application that allows to reproduce your issue? |
I am going to close here for now due to the lack of feedback. Please let us know when you have more information and we can consider to reopen. |
@xabbuh today had some time to create small repo https://github.com/oleg-andreyev/bug_app/tree/issue-57780 |
@xabbuh ping |
Hey, thanks for your report! |
Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3 |
Symfony version(s) affected
6.4.x
Description
I have a page with form where I have collection of items and each time has AutoComplete Field (https://symfony.com/bundles/ux-autocomplete/current/index.html)
query_builder
ORMQueryBuilderLoader::getEntitiesByIds
it does not even try to check current UoW and forces execute query (ignoring UoW cache)How to reproduce
Possible Solution
Since we have access to UoW, try to check memory before executing QB.
\Doctrine\ORM\UnitOfWork::tryGetById
will return entity or null, if entity returned, we can reduce $values and execute on "rest"Additional Context
No response
The text was updated successfully, but these errors were encountered: