DDC-2840: Allow "options" on the id element for XmlDriver and AnnotationDriver #3544

Open
opened 2026-01-22 14:21:58 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 6, 2013).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user luxforma:

XmlDriver and AnnotationDriver does not allow for "options" on the "id" element, which the YamlDriver does.

This would help, since specifying "unsigned integer" using column-definition will make the doctrine orm:schema-tool:update think that the unsigned column in the database table doesn't match the signed integer in the mapping.

    if (isset($idElement['options'])) {
        $mapping['options'] = $idElement['options'];
    }

Changes would need to take place in Doctrine\ORM\XmlDriver, doctrine-mapping.xsd and Doctrine\ORM\AnnotationDriver

I've come around this by extending the XmlDriver to parse the "options" element, and using a modified xsd file, but it would be helpful it it was actually part of doctrine.

Originally created by @doctrinebot on GitHub (Dec 6, 2013). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user luxforma: XmlDriver and AnnotationDriver does not allow for "options" on the "id" element, which the YamlDriver does. This would help, since specifying "unsigned integer" using column-definition will make the doctrine orm:schema-tool:update think that the unsigned column in the database table doesn't match the signed integer in the mapping. ``` if (isset($idElement['options'])) { $mapping['options'] = $idElement['options']; } ``` Changes would need to take place in Doctrine\ORM\XmlDriver, doctrine-mapping.xsd and Doctrine\ORM\AnnotationDriver I've come around this by extending the XmlDriver to parse the "options" element, and using a modified xsd file, but it would be helpful it it was actually part of doctrine.
admin added the Improvement label 2026-01-22 14:21:58 +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#3544