DDC-1398: loading one item at a time when indexBy and EXTRA_LAZY fetch mode is used on a collection #1755

Closed
opened 2026-01-22 13:24:39 +01:00 by admin · 10 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 29, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user hypno:

collection->get($key)

Atm in 2.1.2 this is loading the entire collection. It would be really handy that it would extra lazy load only one item using the association and indexBy fields and given key value (if collection is not initialized and the key havent been loaded yet ofc)

Am i making sense with this?

Originally created by @doctrinebot on GitHub (Sep 29, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user hypno: collection->get($key) Atm in 2.1.2 this is loading the entire collection. It would be really handy that it would extra lazy load only one item using the association and indexBy fields and given key value (if collection is not initialized and the key havent been loaded yet ofc) Am i making sense with this?
admin added the Improvement label 2026-01-22 13:24:39 +01:00
admin closed this issue 2026-01-22 13:24:39 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 20, 2011):

Comment created by @guilhermeblanco:

Updating fix version

@doctrinebot commented on GitHub (Dec 20, 2011): Comment created by @guilhermeblanco: Updating fix version
Author
Owner

@doctrinebot commented on GitHub (Mar 5, 2012):

Comment created by gcaseres:

Is there any fix for this? i have the same problem.

@doctrinebot commented on GitHub (Mar 5, 2012): Comment created by gcaseres: Is there any fix for this? i have the same problem.
Author
Owner

@doctrinebot commented on GitHub (Mar 10, 2012):

Comment created by deatheriam:

It makes a perfect sense here, I wish it was possible, it would give us a room for even more optimization. Any input on the issue from the developers?

@doctrinebot commented on GitHub (Mar 10, 2012): Comment created by deatheriam: It makes a perfect sense here, I wish it was possible, it would give us a room for even more optimization. Any input on the issue from the developers?
Author
Owner

@doctrinebot commented on GitHub (Jun 19, 2013):

Comment created by sandermarechal:

Any progress on this? I'd love to have get() that works on EXTRA_LAZY collections.

@doctrinebot commented on GitHub (Jun 19, 2013): Comment created by sandermarechal: Any progress on this? I'd love to have get() that works on EXTRA_LAZY collections.
Author
Owner

@doctrinebot commented on GitHub (Jun 19, 2013):

Comment created by @ocramius:

[~sandermarechal] pull requests are welcome :)

@doctrinebot commented on GitHub (Jun 19, 2013): Comment created by @ocramius: [~sandermarechal] pull requests are welcome :)
Author
Owner

@doctrinebot commented on GitHub (Jun 20, 2013):

Comment created by sandermarechal:

I'm on it :-) I see the ORM is already in 2.4-RC stage. If my pull is accepted, can it still be included in 2.4 or will it have to wait until 2.5?

@doctrinebot commented on GitHub (Jun 20, 2013): Comment created by sandermarechal: I'm on it :-) I see the ORM is already in 2.4-RC stage. If my pull is accepted, can it still be included in 2.4 or will it have to wait until 2.5?
Author
Owner

@doctrinebot commented on GitHub (Jun 20, 2013):

Comment created by @ocramius:

[~sandermarechal] no, it would need to wait for 2.5

@doctrinebot commented on GitHub (Jun 20, 2013): Comment created by @ocramius: [~sandermarechal] no, it would need to wait for 2.5
Author
Owner

@doctrinebot commented on GitHub (Jun 20, 2013):

Comment created by sandermarechal:

Ah, too bad. Anyway: https://github.com/doctrine/doctrine2/pull/706

@doctrinebot commented on GitHub (Jun 20, 2013): Comment created by sandermarechal: Ah, too bad. Anyway: https://github.com/doctrine/doctrine2/pull/706
Author
Owner

@doctrinebot commented on GitHub (Jun 20, 2013):

Comment created by @beberlei:

Merged for 2.4, we will release some more RCs

@doctrinebot commented on GitHub (Jun 20, 2013): Comment created by @beberlei: Merged for 2.4, we will release some more RCs
Author
Owner

@doctrinebot commented on GitHub (Jun 20, 2013):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jun 20, 2013): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1755