Jira issue originally created by user tibec:
I'm working on a Symfony based CMS for a game server. The game server use two databases (the auth database and characters database) and i've created a new one for the CMS named site.
Currently my News entity must have a relation with the Account entity but the News entity come from the Site EntityManager (who manage the site database) and the Account entity come from the Auth EntityManager (who manage the auth database).
So, when I prompt the command "php app/console doctrine:schema:update --em="site" --force" I got the error "Class Eluna\MemberBundle\Entity\Account is not a valid entity or mapped super class." But if I join an entity who is in the same EntityManager it work perfectly.
My code :
* @var object $author
* @ORM\JoinColumn(name="author", referencedColumnName="id")
Comment created by @beberlei:
Unless the entities are in the same database server (MySQL) but just in different databses you can use the syntax "database.table" in the @Table. Otherwise there is no nice solution, you have to save the foreign key manually in an integer column and maybe use an event listener to fetch a proxy of the related object. But that has to be coded manually.
Issue was closed with resolution "Can't Fix"