[PR #5590] Fix discriminator column defaults #9656

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

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

State: closed
Merged: Yes


DiscriminatorColumn mapping generated by all 3 metadata drivers (annot, yml, xml) was lacking length and type when only the name is specified in the mapping. Even though this results in a columnDef that generates a string column of length 255, the mapping for the discriminator column should have those fields set properly, and should be consistent with the behavior when no discriminator column mapping is specified at all.

Adjusted docs to properly reflect that the @DiscriminatorColumn annotation is optional.

Closes: #1601

**Original Pull Request:** https://github.com/doctrine/orm/pull/5590 **State:** closed **Merged:** Yes --- DiscriminatorColumn mapping generated by all 3 metadata drivers (annot, yml, xml) was lacking length and type when only the name is specified in the mapping. Even though this results in a columnDef that generates a string column of length 255, the mapping for the discriminator column should have those fields set properly, and should be consistent with the behavior when no discriminator column mapping is specified at all. Adjusted docs to properly reflect that the @DiscriminatorColumn annotation is optional. Closes: #1601
admin added the pull-request label 2026-01-22 16:05:00 +01:00
admin closed this issue 2026-01-22 16:05:01 +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#9656