-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
Bug Report
| Q | A |
|---|---|
| Version | 3.6.2 |
Summary
A SequenceGenerator defined in the MappedSuperclass does not modify the generated sequence name.
How to reproduce
MappedSuperClass
#[ORM\MappedSuperclass]
class ParentSuperclass
{
#[ORM\Column(name: "id_parent", type: Types::INTEGER)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: "SEQUENCE")]
#[ORM\SequenceGenerator(sequenceName: 'seq_id_parent')]
protected ?int $id = null;
}Child
#[ORM\Entity]
#[ORM\Table(name: 'child')]
class Child extends ParentSuperclass
{}doctrine:schema:update --dump-sql
CREATE SEQUENCE child_id_parent_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE TABLE child (id_parent INT NOT NULL, PRIMARY KEY (id_parent));This can be worked around by moving the $id property with attributes to the Child class.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels