Allow override of fetch for associations #5190

Closed
opened 2026-01-22 15:01:02 +01:00 by admin · 2 comments
Owner

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?

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?
admin added the New Feature label 2026-01-22 15:01:02 +01:00
admin closed this issue 2026-01-22 15:01:02 +01:00
Author
Owner

@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

@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
Author
Owner

@Ocramius commented on GitHub (May 31, 2017):

Handled in #5938 👍

@Ocramius commented on GitHub (May 31, 2017): Handled in #5938 :+1:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5190