mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
doctrine:schema:update not working with dynamic schema names #5072
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ju1ius on GitHub (Mar 30, 2016).
I use a
Events::loadClassMetadatalistener in order to dynamically add the schema name to my entities. I need this to do cross-db joins.However, the schema tool is now unable to detect any change. The output of the following command is always the same...
@ju1ius commented on GitHub (Mar 30, 2016):
To be a bit more precise, when running
The output contains queries concerning only the
barschema, nothing aboutfoo.So it looks like the custom schema name is applied, but the schema tool does not check all the databases...
@ju1ius commented on GitHub (Mar 30, 2016):
And if I set the
schema_filteroption to/^foo\..*$/, then it wants to create all thebar.*tables, although they already exists... 😕@ju1ius commented on GitHub (Mar 30, 2016):
@core23 commented on GitHub (Oct 23, 2017):
I can confirm this issue when using something like this:
@core23 commented on GitHub (Oct 23, 2017):
Think I got it. You have to import the Trait in the real Entity class.
If you use something like this, it won't work:
@lcobucci commented on GitHub (Oct 26, 2017):
@ju1ius have you tried to use the
schemaproperty of@Table?http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html#annref-table