mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #10808] Verify UnitOfWork::HINT_DEFEREAGERLOAD exists and is true #12632
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/10808
State: closed
Merged: Yes
In some EAGER relationships a proxy instance is always retrieved instead of an instance of the class. This is because there is the
UnitOfWork::HINT_DEFEREAGERLOADhint, which cannot be deactivated even when the DQL indicates that the load should be EAGER or when we execute:$query->setHint(UnitOfWork::HINT_DEFEREAGERLOAD, false);With the change introduced by executing the line above, the value of
HINT_DEFEREAGERLOADwill be taken into account, and lazy loading will only occur whenHINT_DEFEREAGERLOADistrue.