remove the unnecessary check
This commit is contained in:
parent
8d91f7de60
commit
eb22db0dcf
@ -95,13 +95,7 @@ class NonStrictReadWriteCachedEntityPersister extends AbstractEntityPersister
|
|||||||
|
|
||||||
private function updateCache($entity, $isChanged)
|
private function updateCache($entity, $isChanged)
|
||||||
{
|
{
|
||||||
$class = $this->class;
|
$class = $this->metadataFactory->getMetadataFor(get_class($entity));
|
||||||
$className = ClassUtils::getClass($entity);
|
|
||||||
|
|
||||||
if ($className !== $this->class->name) {
|
|
||||||
$class = $this->metadataFactory->getMetadataFor($className);
|
|
||||||
}
|
|
||||||
|
|
||||||
$key = new EntityCacheKey($class->rootEntityName, $this->uow->getEntityIdentifier($entity));
|
$key = new EntityCacheKey($class->rootEntityName, $this->uow->getEntityIdentifier($entity));
|
||||||
$entry = $this->hydrator->buildCacheEntry($class, $key, $entity);
|
$entry = $this->hydrator->buildCacheEntry($class, $key, $entity);
|
||||||
$cached = $this->region->put($key, $entry);
|
$cached = $this->region->put($key, $entry);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user