我在他们的博客上阅读Doctrine中的跨数据库连接:http://www.doctrine-project.org/blog/cross-database-joins.html
问题是每当表名包含一个点(用于指定数据库)时,doctrine:schema:update
输出Nothing to update - your database is already in sync with the current entity metadata.
该命令基本上只是忽略表名包含点的实体。
答案 0 :(得分:3)
这是正常的,它是ORM / DBAL的限制。
Doctrine\ORM\Tools\SchemaTool
使用schema manager retrieved from your current connection。
Doctrine\DBAL\Schema\AbstractSchemaManager
读取表from the current connection's db,而不是所有数据库。
因此,您必须手动处理放置在不同数据库中的表,或者使用您自己的架构管理器和您自己的listTables
实现。