In my symfony2 application, I have two database connections, I would like to save entity classes separately and, therefore, have one set of entity classes in one set and another set in another set. However, trying to call my package, for some reason it was not registered as an entity namespace, the error is as follows:
Unknown Entity namespace alias 'AcmeStaffBundle'.
500 Internal Server Error - ORMException
I searched where it sets the object namespaces and I found that it is in cached files
$e = new \Doctrine\ORM\Configuration();
$e->setEntityNamespaces(array('AcmeStoreBundle' => 'Acme\\StoreBundle\\Entity'));
How can I add this to an array?
NEW EDITING:
My config.yml is as follows, which should help clarify the problem:
orm:
entity_managers:
default:
connection: default
mappings:
AcmeStoreBundle: ~
Foo:
connection: Foo
mappings:
AcmeFooBundle: ~
Thanks in advance