mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2515: Schema tool ignores index names in mapping file and uses generated name #3157
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 @doctrinebot on GitHub (Jun 18, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user hussdl:
I have defined an index on a foreign key colum in my .dcm.xml mapping file:
However, the resulting CREATE TABLE statement includes:
So Doctrine seems to be auto-generating indexes for all foreign key columns. I'm assuming this is a feature, even though I'd argue that there are real-life examples where the mere presence of a foreign key constraint does not justify indexing that column. :)
Anyway, the expected behavior is that Doctrine does not replace existing indexes with generated ones. I will attach a failing test case unless this bug is immediately dismissed as wontfix.
@doctrinebot commented on GitHub (Jun 21, 2013):
Comment created by hussdl:
Test case for SchemaToolTest
@beberlei commented on GitHub (Dec 5, 2020):
Duplicate of https://github.com/doctrine/orm/issues/3294