Skip to content
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

Move bridge #4552

Closed
wants to merge 4 commits into from
Closed

Move bridge #4552

wants to merge 4 commits into from

Conversation

FloVnst
Copy link
Contributor

@FloVnst FloVnst commented Nov 9, 2021

No description provided.

Kevin Verschaeve and others added 4 commits November 9, 2021 21:18
* feat: Avoid eager joining back to the just visited parent

* fix: Remove unnecessary duplicate select statement

This exact select statement is already added a few lines above. The only
exception is when fetchPartial is active, and in that case the current
implementation is wrong anyways, because it always adds the full select.

When this "temporary" solution for avoiding recursion was implemented,
the duplicated line above was not yet there:
https://github.com/api-platform/core/blob/5ba518014e2770e1ad5686b0124b2db45245fee5/src/Bridge/Doctrine/Orm/Extension/EagerLoadingExtension.php#L148

But later, the duplicated statement was added, and the select statement
inside the "Avoid recursion" case was made obsolete:
api-platform@e34427a

* refactor(eager loading): Avoid joining unnecessary recursive relations

* fix: prevent adding same alias twice; doctrine does not like it

Co-authored-by: Pirmin Mattmann <pimattmann@gmail.com>
@laryjulien
Copy link
Contributor

Merged into #4556

@soyuka soyuka closed this Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants