1
0
mirror of synced 2024-12-05 03:06:05 +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)) {
$args->setFoundMetadata(
$args
->getEntityManager()
->getObjectManager()
->getClassMetadata($this->resolveTargetEntities[$args->getClassname()]['targetEntity'])
);
}
@ -96,6 +96,7 @@ class ResolveTargetEntityListener implements EventSubscriber
*/
public function loadClassMetadata(LoadClassMetadataEventArgs $args)
{
/* @var $cm \Doctrine\ORM\Mapping\ClassMetadata */
$cm = $args->getClassMetadata();
foreach ($cm->associationMappings as $mapping) {