Basically, i have a branch of code that connects to three different entity managers (and subsequently, three different MySQL databases).
Unfortunately, two of the databases have tables that are named he same thing, so i cant have all the entities in the same directory, and for structure, id like to avoid that anyways.
So, my question is… How would i set it up so i can have a single entity bundle, with sub-directories under Entity\ and Resources\config\doctrine\
e.g.
Acme\EntityBundle\Entity\DB1\Test.php
Acme\EntityBundle\Entity\DB1\Acme.php
Acme\EntityBundle\Entity\DB2\Test.php
Acme\EntityBundle\Entity\DB2\Foo.php
Acme\EntityBundle\Entity\DB3\Bar.php
and the same idea for Resources\config\doctrine\
The configs are very vague on what to do here…
If you just need the bundle to store entities, I’d rather suggest to store them outside. This way you’d decouple them from the framework.
In both cases configuration is similar. Reference is accessible in the official docs.
Here’s an example:
Few notes: