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

Allow override of fetch for associations #5934

Closed
patrick-mcdougle opened this issue Jul 14, 2016 · 2 comments
Closed

Allow override of fetch for associations #5934

patrick-mcdougle opened this issue Jul 14, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@patrick-mcdougle
Copy link
Contributor

@patrick-mcdougle patrick-mcdougle commented Jul 14, 2016

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

This comment has been minimized.

Copy link
Contributor

@Ma27 Ma27 commented 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 Ocramius added this to the 2.6.0 milestone May 31, 2017
@Ocramius Ocramius self-assigned this May 31, 2017
Ocramius added a commit that referenced this issue May 31, 2017
#5934 - add `fetch` option to `AssociationOverride` in order to override fetch strategy for subclasses of entities
@Ocramius

This comment has been minimized.

Copy link
Member

@Ocramius Ocramius commented May 31, 2017

Handled in #5938 👍

@Ocramius Ocramius closed this May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.