Extra Lazy Associations should mention indexBy parameter #5221

Open
opened 2026-01-22 15:01:52 +01:00 by admin · 2 comments
Owner

Originally created by @ntoniazzi on GitHub (Aug 18, 2016).

In the documentation about Extra Lazy Associations, there is no mention of the indexBy parameter which is mandatory to not load the whole collection when using the methods contains, get, containsKey, etc.

Originally created by @ntoniazzi on GitHub (Aug 18, 2016). In the documentation about [Extra Lazy Associations](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/extra-lazy-associations.html), there is no mention of the `indexBy` parameter which is [mandatory](https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/PersistentCollection.php#L407) to not load the whole collection when using the methods `contains`, `get`, `containsKey`, etc.
Author
Owner

@ComaVN commented on GitHub (Apr 29, 2020):

I got bitten by the same thing. That's a few hours of my life gone...

@ComaVN commented on GitHub (Apr 29, 2020): I got bitten by the same thing. That's a few hours of my life gone...
Author
Owner

@greg0ire commented on GitHub (Apr 29, 2020):

Consider sending a PR to fix that.

@greg0ire commented on GitHub (Apr 29, 2020): Consider sending a PR to fix that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5221