mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 01:13:14 +02:00
[PR #950] [MERGED] Can cache empty collections #8946
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/950
Author: @goetas
Created: 2/11/2014
Status: ✅ Merged
Merged: 2/12/2014
Merged by: @FabioBatSilva
Base:
master← Head:patch-1📝 Commits (5)
1c94c16Can cache empty collectionsa5fbb20Can cache many to many empty relations4a6d6e3Test empty collections second level cache8cdbcf1Merge remote-tracking branch 'origin/master' into patch-194896ceTypo fix on many-to-many assocaition cascade test📊 Changes
4 files changed (+69 additions, -8 deletions)
View changed files
📝
lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php(+2 -2)📝
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheAbstractTest.php(+5 -2)📝
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php(+30 -1)📝
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheOneToManyTest.php(+32 -3)📄 Description
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)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.