1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Do not check at runtime for non-cacheable associations

This commit is contained in:
Asmir Mustafic 2015-06-20 13:38:01 +02:00
parent c685255fe3
commit 11be4fae86
2 changed files with 0 additions and 12 deletions

View File

@ -266,10 +266,6 @@ class DefaultQueryCache implements QueryCache
continue;
}
if ( ! isset($assoc['cache'])) {
throw CacheException::nonCacheableEntityAssociation($entityName, $name);
}
$assocPersister = $this->uow->getEntityPersister($assoc['targetEntity']);
$assocRegion = $assocPersister->getCacheRegion();
$assocMetadata = $assocPersister->getClassMetadata();

View File

@ -234,14 +234,6 @@ abstract class AbstractEntityPersister implements CachedEntityPersister
$class = $this->metadataFactory->getMetadataFor($className);
}
if ($class->containsForeignIdentifier) {
foreach ($class->associationMappings as $name => $assoc) {
if (!empty($assoc['id']) && !isset($assoc['cache'])) {
throw CacheException::nonCacheableEntityAssociation($class->name, $name);
}
}
}
$entry = $this->hydrator->buildCacheEntry($class, $key, $entity);
$cached = $this->region->put($key, $entry);