[PR #950] Can cache empty collections #8951

Open
opened 2026-01-22 16:02:28 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/950

State: closed
Merged: Yes


I should be able to cache an "empty" collection.

I have a some objects, where 90% of these have on-to-many relations with zero associated elements.
This causes doctrine to run a query each time, instead of cache it as empty relation.

(same thing should be applied to many-to-many collections)

**Original Pull Request:** https://github.com/doctrine/orm/pull/950 **State:** closed **Merged:** Yes --- I should be able to cache an "empty" collection. I have a some objects, where 90% of these have on-to-many relations with zero associated elements. This causes doctrine to run a query each time, instead of cache it as empty relation. (same thing should be applied to many-to-many collections)
admin added the pull-request label 2026-01-22 16:02:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8951