1
0
mirror of synced 2025-02-20 22:23:14 +03:00

remove the unnecessary check

This commit is contained in:
SofHad 2015-01-04 20:36:54 +01:00
parent 8d91f7de60
commit eb22db0dcf

View File

@ -95,13 +95,7 @@ class NonStrictReadWriteCachedEntityPersister extends AbstractEntityPersister
private function updateCache($entity, $isChanged)
{
$class = $this->class;
$className = ClassUtils::getClass($entity);
if ($className !== $this->class->name) {
$class = $this->metadataFactory->getMetadataFor($className);
}
$class = $this->metadataFactory->getMetadataFor(get_class($entity));
$key = new EntityCacheKey($class->rootEntityName, $this->uow->getEntityIdentifier($entity));
$entry = $this->hydrator->buildCacheEntry($class, $key, $entity);
$cached = $this->region->put($key, $entry);