I\'ve got an EntityManager instance fully configured and working. The question is how to add an additional namespace to this EM?
$em->getConfiguration()->a
I managed to fix this issue, had to add the driver too:
$namespace = 'My\GreatBundle\Entity';
$configuration = $em->getConfiguration();
$annotationDriver = new AnnotationDriver(
$this->container->get('annotation_reader'),
[__DIR__ . '/../Entity']
);
/** @var MappingDriverChain $driver */
$driver = $configuration->getMetadataDriverImpl();
$driver->addDriver($annotationDriver, $namespace);
$configuration->addEntityNamespace('MyGreatBundle', $namespace);