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

DDC-2550: Inverse side of x-to-one can never be lazy #3276

Closed
doctrinebot opened this issue Jul 11, 2013 · 4 comments
Closed

DDC-2550: Inverse side of x-to-one can never be lazy #3276

doctrinebot opened this issue Jul 11, 2013 · 4 comments
Assignees
Labels

Comments

@doctrinebot
Copy link

Jira issue originally created by user hosiplan:

Here is a note that "Inverse side of x-to-one can never be lazy"

https://github.com/doctrine/doctrine2/blob/29d6da0fa063d55d06117045f3446b2716202d2b/lib/Doctrine/ORM/UnitOfWork.php#L2587-L2588

I don't understand, why there cannot be a proxy. But ok, let's say that for some internal implementation reason there canno be a proxy yet. That means there should be at least an exception raised, when validating schema, telling me this crucial information.

Doing a select over 500 entities would result in 501 queries just because I didn't know about this.
If the validator would tell me, I'd join the entity and had 1 query executed.

Resoltion: you shouldn't allow me to define the association as lazy, or use proxies.

Thank you.

@doctrinebot
Copy link
Author

Comment created by @Ocramius:

Duplicate of DDC-357

@doctrinebot
Copy link
Author

Issue was closed with resolution "Duplicate"

@leberknecht
Copy link

Meanwhile that link is dead, ...i would also be interested in that comment (as this pitfall hit me as well), is there a working link?

@jdeniau
Copy link

jdeniau commented Mar 17, 2023

@leberknecht See #4389 for undead link 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants