mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Allow override of fetch for associations #5190
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?
Originally created by @patrick-mcdougle on GitHub (Jul 14, 2016).
Originally assigned to: @Ocramius on GitHub.
There's currently no way to change the fetch mode after the association has been added to the mapping. In the case when a 3rd party creates a mapping for a collection that is mapped extra lazy, there's no way to change it to be eagerly fetched instead in application level code.
I suggest adding this to the association-overrides options.
Thoughts?
@Ma27 commented on GitHub (Jul 16, 2016):
I think adding this to the following method and extending the annotation should do the job: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php#L2140-L2182
@Ocramius commented on GitHub (May 31, 2017):
Handled in #5938 👍