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

Collections data loaded twice when using EAGER loading in combination with iterables #11081

Closed
bobvandevijver opened this issue Nov 23, 2023 · 1 comment · Fixed by #11082
Closed

Comments

@bobvandevijver
Copy link
Contributor

bobvandevijver commented Nov 23, 2023

Bug Report

Q A
BC Break yes
Version 2.17.0/2.17.1

Summary

With #8391 optimisations where added with relation to eager loading collections. However, the eager load of the collection is not triggered when using an iterable result, causing the collection to be hydrated twice when actually accessed.

Current behavior

When an uninitialised collection within an entity coming from a iterable result is hit, it will trigger its load. However, this load also triggers the unit of work to process the stored eagerly loaded collection to load, resulting in the collection being loaded twice: it will contain duplicate items.

How to reproduce

See the added test, and proposed fix in #11082.

Expected behavior

The collection should not contains each item twice. I believe the eager load for the collection should be skipped by the UoW as it is already being loaded at that time.

@bobvandevijver
Copy link
Contributor Author

A quick tag for @beberlei as contributor of #8391

bobvandevijver added a commit to utwente/living-textbook that referenced this issue Dec 6, 2023
robertohuru pushed a commit to I-GUIDE/ucgis-living-textbook that referenced this issue Mar 5, 2024
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.

1 participant