Affects Version/s: 2.0-BETA2
Fix Version/s: 2.0-BETA3
Security Level: All
Assuming that all child classes of an @InheritanceType("SINGLE_TABLE") and @InheritanceType("JOINED") table should be defined in the topmost parent's @DiscriminatorMap, it would be very helpful to add this validation to the CLI orm:valdiate-schema.
At present, if a child table is defined in the topmost table @DiscriminatorMap on a SINGLE_TABLE inheritance, then orm:validate-schema states that the mapping files are correct but then a Doctrine\DBAL\Schema\SchemaException is thrown. The same exception is also thrown for other schema-tool commands (such as 'create').
Haven't tested what happens on a JOINED table..
Schema tool commands (create, validate-schema) then throw:
... and orm:validate-schema actually says that the mapping is correct (which it obviously isn't) before throwing the exception:
Not critical since the mapping is obviously wrong here, but having this extra check in the validator could save a lot of debugging time. A duplicate table name error is confusing in this situation, and it seems wrong that the validate-schema command presently reports that the mapping files are correct when in fact the inheritance is broken.
|Field||Original Value||New Value|
|Assignee||Roman S. Borschel [ romanb ]||Benjamin Eberlei [ beberlei ]|
|Fix Version/s||2.0-BETA3 [ 10060 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Workflow||jira [ 11375 ]||jira-feedback [ 14434 ]|
|Workflow||jira-feedback [ 14434 ]||jira-feedback2 [ 16298 ]|
|Workflow||jira-feedback2 [ 16298 ]||jira-feedback3 [ 18551 ]|