DDC-1177: Schema-tool generate entities Class inheritance child tables require primary key #1480

Open
opened 2026-01-22 13:15:40 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (May 27, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user venimus:

got

Profiles:
  type: entity
  table: profiles
  repositoryClass: Repositories\Base
  inheritanceType: JOINED
  discriminatorColumn:
    name: profiletype
    type: integer
    length: 11
  discriminatorMap:
    1: Personal
    2: Work
    3: Business
  fields:
    id:
      id: true
      type: integer
      generator:
        strategy: IDENTITY
    firstname:
      type: string
      length: 255
      fixed: false
      nullable: true
    lastname:
      type: string
      length: 255
      fixed: false
      nullable: true
    email:
      type: string
      length: 255
      fixed: false
      nullable: true

and

Business:
  type: entity
  table: business
  repositoryClass: Repositories\Base
  fields:
    businessname:
      type: string
      length: 255
      fixed: false
      nullable: true

and also have

class Business extends Profiles
{
..
}

which should be the proper mapping

but still get

[Doctrine\ORM\Mapping\MappingException]
No identifier/primary key specified for Entity 'Business'. Every Entity must have an identifier/primary key.
Originally created by @doctrinebot on GitHub (May 27, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user venimus: got ``` Profiles: type: entity table: profiles repositoryClass: Repositories\Base inheritanceType: JOINED discriminatorColumn: name: profiletype type: integer length: 11 discriminatorMap: 1: Personal 2: Work 3: Business fields: id: id: true type: integer generator: strategy: IDENTITY firstname: type: string length: 255 fixed: false nullable: true lastname: type: string length: 255 fixed: false nullable: true email: type: string length: 255 fixed: false nullable: true ``` and ``` Business: type: entity table: business repositoryClass: Repositories\Base fields: businessname: type: string length: 255 fixed: false nullable: true ``` and also have ``` class Business extends Profiles { .. } ``` which should be the proper mapping but still get ``` [Doctrine\ORM\Mapping\MappingException] No identifier/primary key specified for Entity 'Business'. Every Entity must have an identifier/primary key. ```
admin added the Bug label 2026-01-22 13:15:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1480