Skip to content


DDC-2669: YAML mapping: discriminator map exception #3406

doctrinebot opened this Issue · 0 comments

2 participants


Jira issue originally created by user dash:

I'm getting this exception when I generate all entities from YAML using orm:generate-entities:

Entity class 'Entity\PersonIndividual' used in the discriminator map of class 'Entity\Person' does not exist.

My discriminator map defined in Entity.Person.dcm.yml:

  1: PersonIndividual
  2: PersonCompany
  3: PersonSelfEmployed

Mapping driver probably generates entities in wrong order, so entities defined in discriminator map does not exist when entity Person is being generated.

Note: The easiest workaround is to temporarily remove discriminatorMap_ definition from entity, generate entities, then put _discriminatorMap back and then generate entities again. It would be great if it would be possible to generate all entities in only one step.

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.