|
@@ -16,6 +16,7 @@ use Symfony\Component\Form\Guess\Guess;
|
|
|
use Symfony\Component\Form\Guess\TypeGuess;
|
|
|
use Symfony\Component\Form\Guess\ValueGuess;
|
|
|
use Symfony\Bridge\Doctrine\RegistryInterface;
|
|
|
+use Doctrine\ORM\Mapping\MappingException;
|
|
|
|
|
|
class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
|
|
|
{
|
|
@@ -122,8 +123,10 @@ class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
|
|
|
|
|
|
$this->cache[$class] = null;
|
|
|
foreach ($this->registry->getEntityManagers() as $name => $em) {
|
|
|
- if (!$em->getConfiguration()->getMetadataDriverImpl()->isTransient($class)) {
|
|
|
+ try {
|
|
|
return $this->cache[$class] = array($em->getClassMetadata($class), $name);
|
|
|
+ } catch (MappingException $e) {
|
|
|
+ // not an entity or mapped super class
|
|
|
}
|
|
|
}
|
|
|
}
|