Closed mariusklocke closed 6 years ago
@mariusklocke can this be reproduced in isolation (see https://github.com/doctrine/doctrine2/tree/master/tests/Doctrine/Tests/ORM/Functional/Ticket for examples)? Is this affecting latest ORM?
I'll try to provide a Testcase. By "latest" you mean master branch? It's definitely happing on 2.6.0
Are there any conventions i should follow for naming my branch?
@mariusklocke no convention - feel free to pick anything. We'll adjust the patch anyway once we have a clue of what is going on in an isolated scenario. My suggestion is to name the test DDC7062Test.
@Ocramius Hey, i created a PR with a failing test, but i am unsure whether i got the branches right. I created my branch from 2.6 branch, but the contribution guidelines say all PRs have to go to master? That seems weird to me, because i thought bugfixes for 2.6 should go into 2.6 branch? Can you help me out here?
@mariusklocke send it against 2.6
for now - we'll figure it out :) You can just edit the open pull request
Handled in #7082
Hey folks,
i think i found a bug when combining one-to-one associations with association-key identifiers. My application deals with soccer leagues and the issue should become visible with the following 3 related entities:
The issue arises when changes to
RankingPosition
need to be persisted. Updating this entity does not work, because the resulting query sends a wrong parameter type for theseason_id
Doctrine determines
1
as parameter type (corresponds toPDO::PARAM_INT
) for theseason_id
, but it should bestring
.I did a little debugging and i think i found an implementation flaw in
Doctrine\ORM\Persisters\Entity\BasicEntityPersister::updateTable()
. The method tries to determine the parameter type for each identifier column, by using thetype
field in the target entitiesassociationMappings
. This fields value does NOT represent one of thePDO::PARAM_*
constants. I think this field reflects the association type and the value1
here represents the constantDoctrine\ORM\Mapping\ClassMetadataInfo::ONE_TO_ONE
.Can anybody closer to the project confirm my assumptions?
You can find my application here on Github: https://github.com/mariusklocke/liga-manager-api