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

Ignore orderBy in UOW eagerLoadCollections() method #11381

Closed
lewbor opened this issue Mar 19, 2024 · 2 comments · Fixed by #11422
Closed

Ignore orderBy in UOW eagerLoadCollections() method #11381

lewbor opened this issue Mar 19, 2024 · 2 comments · Fixed by #11422

Comments

@lewbor
Copy link

lewbor commented Mar 19, 2024

Bug Report

Q A
BC Break no
Version 2.19.1

Summary

When using a collection eager loading (UnitOfWork::eagerLoadCollections method), #[OrderBy] attribute on collection is ignoring now. In line
$found = $this->getEntityPersister($targetEntity)->loadAll([$mappedBy => $entities])
it must be
$found = $this->getEntityPersister($targetEntity)->loadAll([$mappedBy => $entities], $mapping['orderBy']);

@tomasz-ryba
Copy link

It's an older problem already discussed here #11163 and seems to be related to changes introduced with #8391

tomasz-ryba pushed a commit to tomasz-ryba/orm that referenced this issue Apr 23, 2024
Fetch EAGER mode ignores orderBy as of changes introduced with doctrine#8391
Fixes duplicated doctrine#11381
tomasz-ryba pushed a commit to tomasz-ryba/orm that referenced this issue Apr 23, 2024
Fetch EAGER mode ignores orderBy as of changes introduced with doctrine#8391
Fixes duplicated doctrine#11381
tomasz-ryba pushed a commit to tomasz-ryba/orm that referenced this issue Apr 24, 2024
Fetch EAGER mode ignores orderBy as of changes introduced with doctrine#8391
Fixes duplicated doctrine#11381
tomasz-ryba pushed a commit to tomasz-ryba/orm that referenced this issue Apr 24, 2024
Fetch EAGER mode ignores orderBy as of changes introduced with doctrine#8391
Fixes duplicated doctrine#11381
@greg0ire greg0ire linked a pull request Apr 24, 2024 that will close this issue
greg0ire pushed a commit to tomasz-ryba/orm that referenced this issue Apr 24, 2024
EAGER fetch mode ignores orderBy as of changes introduced with doctrine#8391

Fixes doctrine#11163
Fixes doctrine#11381
@beberlei
Copy link
Member

Fixed by #11422

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 a pull request may close this issue.

3 participants