Skip to content

All sequences merged into one since the merge of #10455 #10953

@NoiseByNorthwest

Description

@NoiseByNorthwest

Bug Report

All sequences merged into one since the merge of #10455

Q A
BC Break yes if the generated SQL (DDL) is an API boundary
Version 2.16.2 (last known good 2.15.5)

Summary

Since the upgrade of doctrine/orm from 2.15.5 to 2.16.2 all sequences, as resolved by ClassMetadataFactory, are replaced by a single one.

It seems to be a side effect of #10455.
Is it a bug ?
Or is there a way (config ?) or recommended workaround to have the original behavior ?

Current behavior

Since 2.16 (2.16.2) all concrete classes now share the same sequence, which has BTW a name based on the super class's one.

How to reproduce

We have a sequence defined in a mapped super class

/**
 * @ORM\HasLifecycleCallbacks
 * @ORM\MappedSuperclass
 */
abstract class BaseModel
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column( type = "integer", name = "id" )
     *
     * @readonly
     */
    private int $id;
}
/**
 * @ORM\Entity
 * @ORM\Table
 */
class Foo extends BaseModel
{
}
/**
 * @ORM\Entity
 * @ORM\Table
 */
class Bar extends BaseModel
{
}

Expected behavior

Before 2.16 (2.15.5) all concrete classes had their own sequence.
That means, with the provided reproducer, that Foo and Bar must have their own sequence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions