diff --git a/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php b/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php index b3d6e0f46..c1547e52e 100644 --- a/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php +++ b/lib/Doctrine/ORM/Cache/DefaultCacheFactory.php @@ -181,8 +181,13 @@ class DefaultCacheFactory implements CacheFactory */ public function buildCollectionHydrator(EntityManagerInterface $em, array $mapping) { + /* @var $targetPersister \Doctrine\ORM\Cache\Persister\CachedPersister */ $targetPersister = $em->getUnitOfWork()->getEntityPersister($mapping['targetEntity']); - return new DefaultCollectionHydrator($em, $targetPersister->getCacheRegion()); + + return new DefaultCollectionHydrator( + $em, + $targetPersister->getCacheRegion() + ); } /**