1
0
mirror of synced 2025-02-09 08:49:26 +03:00

Entity cache key is built differently on read than on write

This commit is contained in:
Guido Contreras Woda 2015-11-17 16:10:17 -03:00
parent 84eb175dbf
commit 427642aaba

View File

@ -111,10 +111,11 @@ class DefaultQueryCache implements QueryCache
$region = $persister->getCacheRegion();
$regionName = $region->getName();
$cm = $this->em->getClassMetadata($entityName);
// @TODO - move to cache hydration component
foreach ($entry->result as $index => $entry) {
if (($entityEntry = $region->get($entityKey = new EntityCacheKey($entityName, $entry['identifier']))) === null) {
if (($entityEntry = $region->get($entityKey = new EntityCacheKey($cm->rootEntityName, $entry['identifier']))) === null) {
if ($this->cacheLogger !== null) {
$this->cacheLogger->entityCacheMiss($regionName, $entityKey);