Removing registration of proxy ClassMetadata by the proxyFactory
Ensuring that functionality is kept by checking for the real class name in the ClassMetadataFactory
This commit is contained in:
parent
37279d0753
commit
d1e868a32a
@ -24,6 +24,7 @@ use ReflectionException,
|
|||||||
Doctrine\ORM\EntityManager,
|
Doctrine\ORM\EntityManager,
|
||||||
Doctrine\DBAL\Platforms,
|
Doctrine\DBAL\Platforms,
|
||||||
Doctrine\ORM\Events,
|
Doctrine\ORM\Events,
|
||||||
|
Doctrine\Common\Util\ClassUtils,
|
||||||
Doctrine\Common\Persistence\Mapping\RuntimeReflectionService,
|
Doctrine\Common\Persistence\Mapping\RuntimeReflectionService,
|
||||||
Doctrine\Common\Persistence\Mapping\ReflectionService,
|
Doctrine\Common\Persistence\Mapping\ReflectionService,
|
||||||
Doctrine\Common\Persistence\Mapping\ClassMetadataFactory as ClassMetadataFactoryInterface;
|
Doctrine\Common\Persistence\Mapping\ClassMetadataFactory as ClassMetadataFactoryInterface;
|
||||||
@ -168,6 +169,8 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
|
|||||||
|
|
||||||
return $this->loadedMetadata[$realClassName];
|
return $this->loadedMetadata[$realClassName];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$realClassName = ClassUtils::getRealClass($realClassName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->cacheDriver) {
|
if ($this->cacheDriver) {
|
||||||
|
@ -93,10 +93,6 @@ class ProxyFactory
|
|||||||
require $fileName;
|
require $fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $this->_em->getMetadataFactory()->hasMetadataFor($fqn)) {
|
|
||||||
$this->_em->getMetadataFactory()->setMetadataFor($fqn, $this->_em->getClassMetadata($className));
|
|
||||||
}
|
|
||||||
|
|
||||||
$entityPersister = $this->_em->getUnitOfWork()->getEntityPersister($className);
|
$entityPersister = $this->_em->getUnitOfWork()->getEntityPersister($className);
|
||||||
|
|
||||||
return new $fqn($entityPersister, $identifier);
|
return new $fqn($entityPersister, $identifier);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user