Generated entities don't extend to the base class when we use inheritance mappings #6139

Closed
opened 2026-01-22 15:27:29 +01:00 by admin · 1 comment
Owner

Originally created by @maidmaid on GitHub (Dec 18, 2018).

Originally assigned to: @Ocramius on GitHub.

Bug Report

Q A
BC Break no
Version 2.6

Summary

When we run doctrine:mapping:convert with inheritance mappings, the generated entities don't extend to the base class.

Current behavior

From:

MyProject\Model\Person:
  type: entity
  inheritanceType: SINGLE_TABLE
  discriminatorColumn: { name: discr, type: string }
  discriminatorMap:
    person: Person
    employee: Employee
MyProject\Model\Employee:
  type: entity

Generated entity:

class Employee {}

How to reproduce

Expected behavior

class Employee extends Person {}
Originally created by @maidmaid on GitHub (Dec 18, 2018). Originally assigned to: @Ocramius on GitHub. ### Bug Report <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ------ | BC Break | no | Version | 2.6 #### Summary When we run `doctrine:mapping:convert` with inheritance mappings, the generated entities don't extend to the base class. #### Current behavior From: ```yml MyProject\Model\Person: type: entity inheritanceType: SINGLE_TABLE discriminatorColumn: { name: discr, type: string } discriminatorMap: person: Person employee: Employee MyProject\Model\Employee: type: entity ``` Generated entity: ```php class Employee {} ``` #### How to reproduce #### Expected behavior ```php class Employee extends Person {} ```
admin added the BugWon't FixQuestion labels 2026-01-22 15:27:29 +01:00
admin closed this issue 2026-01-22 15:27:29 +01:00
Author
Owner

@Ocramius commented on GitHub (Dec 18, 2018):

The entity generator is deprecated, removed from master, and will no longer be improved.

@Ocramius commented on GitHub (Dec 18, 2018): The entity generator is deprecated, removed from `master`, and will no longer be improved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6139