I've looked all around for a way to join multiple databases using doctrine 2, but all i've found until now are work arounds but i couldn't understood how to modify my config file to do so
//my config.php file
$isDevMode = true;
$path = array(ROOTPATH."/src");
$config = Setup::createAnnotationMetadataConfiguration($path, $isDevMode);
// database configuration parameters
$conn = array(
'driver' => 'pdo_mysql',
'user' => 'root',
'password' => '',
'dbname' => 'test',
);
// obtaining the entity manager
$entityManager = EntityManager::create($conn, $config);
On this topic here, the accepted answer said that i have to create multiple entity managers,which it's logic , but when i got here, on the PHP tab(i'm using PHP as annotations), i was lost.Couldn't figure out how to change my already existing config file. Then i found a documentation about joining databases, here , but that looks very different from what i have , probably because is an older version and i don't know if this still work, but i haven't tested that because i don't use yaml,and there's nowhere an explanation on how to do that without using a framework or yaml,xml annotations.