2

I was reading about cross database joins in Doctrine on their blog: http://www.doctrine-project.org/blog/cross-database-joins.html The problem is that whenever table name contains a dot (used to specify the database), doctrine:schema:update outputs Nothing to update - your database is already in sync with the current entity metadata. The command basically just ignores entities whose table name contains a dot.

Žan Kusterle
  • 572
  • 1
  • 10
  • 28
  • Here's a very similar question, but it has no right answer http://stackoverflow.com/questions/14034943/doctrine-not-detecting-schema-changes-with-one-entity-manager-and-multiple-datab – Žan Kusterle Mar 13 '13 at 15:43

1 Answers1

3

This is normal and it is a limitation of the ORM/DBAL.

The Doctrine\ORM\Tools\SchemaTool uses a schema manager retrieved from your current connection.

The Doctrine\DBAL\Schema\AbstractSchemaManager reads the tables from the current connection's db, and not from all databases.

Therefore, you have to manually handle tables placed in different DBs, or use your own schema manager with your own listTables implementation.

Ocramius
  • 25,171
  • 7
  • 103
  • 107