1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

#385 #1181 DDC-3385 - aligning tests and implementation to new OnClassMetadataNotFoundEventArgs API

This commit is contained in:
Marco Pivetta 2015-01-13 20:56:57 +01:00
parent 6debf2c909
commit 662b49608c

View file

@ -79,7 +79,7 @@ class ResolveTargetEntityListener implements EventSubscriber
if (array_key_exists($args->getClassName(), $this->resolveTargetEntities)) { if (array_key_exists($args->getClassName(), $this->resolveTargetEntities)) {
$args->setFoundMetadata( $args->setFoundMetadata(
$args $args
->getEntityManager() ->getObjectManager()
->getClassMetadata($this->resolveTargetEntities[$args->getClassname()]['targetEntity']) ->getClassMetadata($this->resolveTargetEntities[$args->getClassname()]['targetEntity'])
); );
} }
@ -96,6 +96,7 @@ class ResolveTargetEntityListener implements EventSubscriber
*/ */
public function loadClassMetadata(LoadClassMetadataEventArgs $args) public function loadClassMetadata(LoadClassMetadataEventArgs $args)
{ {
/* @var $cm \Doctrine\ORM\Mapping\ClassMetadata */
$cm = $args->getClassMetadata(); $cm = $args->getClassMetadata();
foreach ($cm->associationMappings as $mapping) { foreach ($cm->associationMappings as $mapping) {