You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generating the migrations with ./bin/console make:migration gives the error : Duplicate definition of column 'id' on entity 'App\Entity\Daughter' in a field or discriminator column mapping.
<?phpdeclare(strict_types=1);
namespaceApp\Entity;
useApp\SomewhereElse\BaseEntity; // Comment this line to make the problem disappear.useDoctrine\ORM\MappingasORM;
#[ORM\MappedSuperclass()]
abstractclassMotherextendsBaseEntity {}
If App\Entity\Mother extends App\SomewhereElse\BaseEntity, the error appears (report_fields_where_declared: true with ORM 2.x).
If App\Entity\Mother extends App\Entity\BaseEntity, it works.
Expected behavior
I would like to be able to extend mapped superclasses from libraries (other namespaces).
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
Hi,
On a Symfony 7 app, you can not have multiple inheritance mapped superclasses in different namespaces.
May be related to : #11404
Current behavior
Generating the migrations with
./bin/console make:migration
gives the error :Duplicate definition of column 'id' on entity 'App\Entity\Daughter' in a field or discriminator column mapping.
How to reproduce
If
App\Entity\Mother
extendsApp\SomewhereElse\BaseEntity
, the error appears (report_fields_where_declared: true
with ORM 2.x).If
App\Entity\Mother
extendsApp\Entity\BaseEntity
, it works.Expected behavior
I would like to be able to extend mapped superclasses from libraries (other namespaces).
The text was updated successfully, but these errors were encountered: