From a5fbb20fbb58377fa876eb1ce8045541e0fbf01b Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 11 Feb 2014 15:08:49 +0100 Subject: [PATCH] Can cache many to many empty relations --- lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php b/lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php index eaca3d75e..3589e31a5 100644 --- a/lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php +++ b/lib/Doctrine/ORM/Cache/Persister/AbstractEntityPersister.php @@ -508,7 +508,7 @@ abstract class AbstractEntityPersister implements CachedEntityPersister $list = $this->persister->loadManyToManyCollection($assoc, $sourceEntity, $coll); - if ($hasCache && ! empty($list)) { + if ($hasCache) { $persister->storeCollectionCache($key, $list); if ($this->cacheLogger) {