mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1540: Associations-keys not detected properly when using the XMLDriver #1935
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 14, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user saem:
When using the association-key attribute on an id element in an XML mapping, a MappingException is thrown:
[Doctrine\ORM\Mapping\MappingException]
No identifier/primary key specified for Entity 'Foo\BarBundle\Entity\Baz'. Every Entity must have an identifier/primary key.
This is because in the XMLDriver.php file (version 2.1.2)
Line 213 reads: $associationIds[(string)$idElement['fieldName']] = true;
When it should read: $associationIds[(string)$idElement['name']] = true;
This was fixed on master here, but has not be back ported -- as I understand it master is 2.x. This is a fairly significant issues for users of the XMLDriver, currently a show stopper on our work, especially as we're using Symfony Standard distribution 2.0.6 -- 2.0.7 references a version of Doctrine with another bug.
I've confirmed that this bug exists in 2.1.2, and 2.1.4, but it probably effects more versions.
@doctrinebot commented on GitHub (Dec 15, 2011):
Comment created by @beberlei:
Merged
@doctrinebot commented on GitHub (Dec 15, 2011):
Issue was closed with resolution "Fixed"