DDC-951: Multiple id columns in the XML mapping are missing #1184

Closed
opened 2026-01-22 13:05:04 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 27, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user schnipseljagd:

this solves the problem for me:

if (isset($fieldMapping['id'])) {
    $mapping['id'] = ((string)$fieldMapping['id'] == "false") ? false : true;
}

in the xml mapping file it looks like:

<field name="id" type="string" id="true" />
<field name="locale" type="string" length="10" id="true" />
Originally created by @doctrinebot on GitHub (Dec 27, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user schnipseljagd: this solves the problem for me: ``` if (isset($fieldMapping['id'])) { $mapping['id'] = ((string)$fieldMapping['id'] == "false") ? false : true; } ``` in the xml mapping file it looks like: ``` xml <field name="id" type="string" id="true" /> <field name="locale" type="string" length="10" id="true" /> ```
admin closed this issue 2026-01-22 13:05:04 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 27, 2010):

Comment created by @beberlei:

is not for specifying ids, is.

<id name="foo" type="string" />
<id name="bar" type="string" />
@doctrinebot commented on GitHub (Dec 27, 2010): Comment created by @beberlei: <field> is not for specifying ids, <id> is. ``` <id name="foo" type="string" /> <id name="bar" type="string" /> ```
Author
Owner

@doctrinebot commented on GitHub (Dec 27, 2010):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Dec 27, 2010): Issue was closed with resolution "Invalid"
Author
Owner

@doctrinebot commented on GitHub (Dec 28, 2010):

Comment created by schnipseljagd:

Ok is see, this is a much nicer solution :-)

ps: i couldnt find this in the documentation.

@doctrinebot commented on GitHub (Dec 28, 2010): Comment created by schnipseljagd: Ok is see, this is a much nicer solution :-) ps: i couldnt find this in the documentation.
Author
Owner

@doctrinebot commented on GitHub (Dec 28, 2010):

Comment created by @beberlei:

its there http://www.doctrine-project.org/docs/orm/2.0/en/reference/xml-mapping.html#defining-identity-and-generator-strategies

@doctrinebot commented on GitHub (Dec 28, 2010): Comment created by @beberlei: its there http://www.doctrine-project.org/docs/orm/2.0/en/reference/xml-mapping.html#defining-identity-and-generator-strategies
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1184