1
0
mirror of synced 2025-01-29 19:41:45 +03:00

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:
Marco Pivetta 2012-03-31 23:26:33 +02:00
parent 37279d0753
commit d1e868a32a
2 changed files with 3 additions and 4 deletions

View File

@ -24,6 +24,7 @@ use ReflectionException,
Doctrine\ORM\EntityManager,
Doctrine\DBAL\Platforms,
Doctrine\ORM\Events,
Doctrine\Common\Util\ClassUtils,
Doctrine\Common\Persistence\Mapping\RuntimeReflectionService,
Doctrine\Common\Persistence\Mapping\ReflectionService,
Doctrine\Common\Persistence\Mapping\ClassMetadataFactory as ClassMetadataFactoryInterface;
@ -168,6 +169,8 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
return $this->loadedMetadata[$realClassName];
}
} else {
$realClassName = ClassUtils::getRealClass($realClassName);
}
if ($this->cacheDriver) {

View File

@ -93,10 +93,6 @@ class ProxyFactory
require $fileName;
}
if ( ! $this->_em->getMetadataFactory()->hasMetadataFor($fqn)) {
$this->_em->getMetadataFactory()->setMetadataFor($fqn, $this->_em->getClassMetadata($className));
}
$entityPersister = $this->_em->getUnitOfWork()->getEntityPersister($className);
return new $fqn($entityPersister, $identifier);