DDC-2035: XML Mapping : add attribute "length" for tag "id" #2565

Closed
opened 2026-01-22 13:57:08 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 20, 2012).

Originally assigned to: @lcobucci on GitHub.

Jira issue originally created by user seros:

XML mapping :
<id name="id" type="string" length="16"/>

Generate SQL :
id varchar(255) not null

It's not possible with XML mapping to have :
id varchar(16) not null

Because tag "id" doesn't support "length" attribute.
Please add this attribute

Originally created by @doctrinebot on GitHub (Sep 20, 2012). Originally assigned to: @lcobucci on GitHub. Jira issue originally created by user seros: **XML mapping :** `<id name="id" type="string" length="16"/>` **Generate SQL :** `id varchar(255) not null` **It's not possible with XML mapping to have :** `id varchar(16) not null` Because tag "id" doesn't support "length" attribute. Please add this attribute
admin added the Invalid label 2026-01-22 13:57:08 +01:00
admin closed this issue 2026-01-22 13:57:09 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 20, 2012):

Comment created by @FabioBatSilva:

Hi Erik,

The atribute "id" arealdy support "length" in the current doctrine version
https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php#L259

Which version are you using ?

@doctrinebot commented on GitHub (Sep 20, 2012): Comment created by @FabioBatSilva: Hi Erik, The atribute "id" arealdy support "length" in the current doctrine version : https://github.com/doctrine/doctrine2/blob/2.3/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php#L259 Which version are you using ?
Author
Owner

@malukenho commented on GitHub (Jan 5, 2017):

@Ocramius @lcobucci can be closed as invalid

@malukenho commented on GitHub (Jan 5, 2017): @Ocramius @lcobucci can be closed as invalid
Author
Owner

@lcobucci commented on GitHub (Jan 5, 2017):

Closing as invalid since it was already supported and we didn't hear anything from the user.

@lcobucci commented on GitHub (Jan 5, 2017): Closing as `invalid` since it was already supported and we didn't hear anything from the user.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2565