DDC-3130: [GH-1033] [WIP] Lazy criteria for ManyToMany collection #3880

Closed
opened 2026-01-22 14:30:15 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (May 18, 2014).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of bakura10:

Url: https://github.com/doctrine/doctrine2/pull/1033

Message:

This continues my previous work on making Criteria most efficient.

Currently we are wrapping matching calls on repositories and matching calls on EXTRA_LAZY associations around a LazyCriteria. However, ManyToMany are still completely loaded: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/PersistentCollection.php#L874

This is still problematic from a performance point of view because count, contains... cannot be optimized. I think the solution is similar to previous one, hence creating a Lazy collection for that kind of associations.

However, this is really tricky to do because of the whole mess inside the persisters (can't wait for them to be completely refactored, it's getting really hard to maintain this mess :p).

Originally created by @doctrinebot on GitHub (May 18, 2014). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of bakura10: Url: https://github.com/doctrine/doctrine2/pull/1033 Message: This continues my previous work on making Criteria most efficient. Currently we are wrapping matching calls on repositories and matching calls on EXTRA_LAZY associations around a LazyCriteria. However, ManyToMany are still completely loaded: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/PersistentCollection.php#L874 This is still problematic from a performance point of view because count, contains... cannot be optimized. I think the solution is similar to previous one, hence creating a Lazy collection for that kind of associations. However, this is really tricky to do because of the whole mess inside the persisters (can't wait for them to be completely refactored, it's getting really hard to maintain this mess :p).
admin added the Bug label 2026-01-22 14:30:15 +01:00
admin closed this issue 2026-01-22 14:30:15 +01:00
Author
Owner

@doctrinebot commented on GitHub (May 18, 2014):

@doctrinebot commented on GitHub (May 18, 2014): - is referenced by [DDC-2535: [GH-712] Extra lazy get for inverse side of many-to-many](http://www.doctrine-project.org/jira/browse/DDC-2535)
Author
Owner

@doctrinebot commented on GitHub (Jan 13, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1033] was assigned:
https://github.com/doctrine/doctrine2/pull/1033

@doctrinebot commented on GitHub (Jan 13, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1033] was assigned: https://github.com/doctrine/doctrine2/pull/1033
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1033] was labeled:
https://github.com/doctrine/doctrine2/pull/1033

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1033] was labeled: https://github.com/doctrine/doctrine2/pull/1033
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1033] was labeled:
https://github.com/doctrine/doctrine2/pull/1033

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1033] was labeled: https://github.com/doctrine/doctrine2/pull/1033
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1033] was unlabeled:
https://github.com/doctrine/doctrine2/pull/1033

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1033] was unlabeled: https://github.com/doctrine/doctrine2/pull/1033
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3880