Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] ORMQueryBuilderLoader::getEntitiesByIds executing query despite that Entity is already loaded #57780

Open
@oleg-andreyev

Description

@oleg-andreyev

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)

  1. I've re-loaded all required entities using IN (...) so they are in UoW
  2. Without Autocomplete is just a wrapper over EntityType
  3. No customquery_builder
  4. But as soon asORMQueryBuilderLoader::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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp