Entity graph (fetch graph) is incorrectly applied to query results beyond the first one

Description

When I apply a fetch graph to a query, it is correctly applied to the first result: eager associations that are not mentioned in the fetch graph are overridden and made lazy.

However, this is not true for query results beyond the first one (index 1, 2, etc.): for those results, eager associations are loaded eagerly, even if they are not mentioned in the fetch graph.

This used to work in 5.4.18.Final.

PR coming, with a test case and hopefully a fix.

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure