Symfony and Doctrine: cross database relations
问题 I have two entities Entity1 and Entity2 with a OneToMany relation, but they live in two MySQL databases. How can I implement those entities with their relation in Symfony? Is it possible to create two separated bundles where to implement those entities? 回答1: In Doctrine, joining data across databases is not technically “supported” by a designed feature, but you can make it work by tricking Doctrine a little bit. If you want to build a relationship between entities then they must use the same