Skip to content

Loading…

DDC-1540: Associations-keys not detected properly when using the XMLDriver #2174

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

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

Comment created by @beberlei:

Merged

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.1.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.