[PR #1006] Handling invalid discriminator values #9026

Closed
opened 2026-01-22 16:02:50 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1006

State: closed
Merged: Yes


Two scenarios:

  • The DiscriminatorMap is specified via metadata. In case the entity's discriminator value is not matching with a value of the DiscriminatorMap it will result in a Notice: Undefined index ... on line 102 and exception 'Doctrine\Common\Persistence\Mapping\MappingException' with message 'Class '' does not exist' in. The proposed changes deal with this.
  • The DiscriminatorMap is automatically generated. The discriminator value may no longer be invalid if there's just metadata missing for the automatically generated class names. I'm not sure how to deal with that properly.
**Original Pull Request:** https://github.com/doctrine/orm/pull/1006 **State:** closed **Merged:** Yes --- Two scenarios: - **The DiscriminatorMap is specified via metadata**. In case the entity's discriminator value is not matching with a value of the DiscriminatorMap it will result in a `Notice: Undefined index ... on line 102` and `exception 'Doctrine\Common\Persistence\Mapping\MappingException' with message 'Class '' does not exist' in`. The proposed changes deal with this. - **The DiscriminatorMap is automatically generated**. The discriminator value may no longer be invalid if there's just metadata missing for the automatically generated class names. I'm not sure how to deal with that properly.
admin added the pull-request label 2026-01-22 16:02:50 +01:00
admin closed this issue 2026-01-22 16:02:50 +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#9026