Skip to content

[v3] Overrides are only allowed for fields or associations declared in mapped superclasses or traits breaks Entity Inheritance #11916

@ro0NL

Description

@ro0NL

Bug Report

Q A
Version 3
Previous Version if the bug is a regression 2

Summary

We rely on single table entity inheritance: https://www.doctrine-project.org/projects/doctrine-orm/en/3.3/reference/inheritance-mapping.html#entity-inheritance

Current behavior

Both with yaml and attribute on v2, we are able to override the inversedBy field on a subclass, without schema validation errors. If we don't do this we actually get validation errors the inversedBy value is missing.

See also https://stackoverflow.com/a/48006725

Upgrading to v3 (with attributes assocication overrides) this breaks:

Overrides are only allowed for fields or associations declared in mapped superclasses or traits.

Expected behavior

Same as v2? AFAIK This worked fine.

Im wondering how the migration is supposed to go, given EntityB extends EntityA with association overrides.

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