mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Duplicate definition of column 'id' on entity '<FQCN>' in a field or discriminator column mapping. #7290
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 @Arkemlar on GitHub (Dec 22, 2023).
BC Break Report
Summary
I use inheritance mapping and since v2.16 it is no longer working. Exact scheme example in the bottom.
Previous behavior
Worked fine.
Current behavior
In a newer version I got following error:
Duplicate definition of column 'id' on entity 'App\Context\Task\Model\TaskHistory' in a field or discriminator column mapping.How to reproduce
Then
bin/console doctrine:schema:validateif you use symfony.If I move
idfield toHistoryclass, then it works as expected. Also works if I use trait for Id instead of abstract class.I know that doctrine not guarantees plain old OOP classes inheritance to work but since it is BC break I decided to report it because it might indicate a new mapping bug.
@mpdude commented on GitHub (Dec 22, 2023):
So the
Entityclass is intentionally not marked as an entity, and you know that this is out of supported configuration?@mpdude commented on GitHub (Dec 22, 2023):
Might be a duplicate of #11129
@Arkemlar commented on GitHub (Jan 3, 2024):
Exactly! And I accent that I made this Issue not because it SHOULD work (it shouldn't), but because it is BC break.
@mpdude commented on GitHub (Jan 3, 2024):
No, it’s not. It is unsupported, unspecified behavior and as such not subject to any promises given.