SensioFrameworkExtraBundle
SensioFrameworkExtraBundle copied to clipboard
[DoctrineParamConverter] resolve_target_entities
hello,
i am trying to make DoctrineParamConverter follow doctrine.orm.resolve_target_entities
config.
afaik the only thing preventing DPC from loading those "resolved" entities is the supports()
method, which returns
return !$em->getMetadataFactory()->isTransient($configuration->getClass());
and this resolves to false
for "resolved" entites.
but this works
try {
$em->getMetadataFactory()->getMetadataFor($configuration->getClass());
return true;
} catch(MappingException $e) {
return false;
}
is there any reason for using ! ->isTransient()
and not ->getMetadataFor()
? will there be any unwanted consequences when i change it to the latter?