mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3373: [GH-1174] Fix associations with a custom type for identifiers #4167
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 (Nov 6, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of jaspernbrouwer:
Url: https://github.com/doctrine/doctrine2/pull/1174
Message:
I was running an experiment using a custom DBAL type, which converts a UUID string (in PHP) to 16 bytes binary string (in SQL) and vice versa, as identifier for a couple of entities. I noticed some associations weren't loaded correctly. This PR attempts to fix that issue.
I've included several tests:
During the "ManyToMany association tests ...", I discovered the join-table wasn't populated properly. The columns were filled with the UUID string (in stead of the 16 bytes binary string). This has been addressed as well.
I've included these tests to verify that:
When applying a fix for the "Loading a OneToMany association with composite identifier including a foreign one" test, the "Loading a OneToOne association with composite identifier including a foreign one" test started to produce an error.
This is due to the Proxy object containing a 16 bytes binary string (in stead of the UUID string) for the foreign identifier.
Also the "Removing entities from a ManyToMany association with composite identifier including a foreign one" tests keeps failing because there's a 16 bytes binary string (in stead of the UUID string) for the foreign identifier in the Collection.
I have a feeling these last 2 cases are not because of an issue in the Persisters, but because of an issue in the Hydrators. Unfortunately I don't know where to begin looking :(
I could really need some help finishing this up!
@doctrinebot commented on GitHub (Nov 6, 2014):
@doctrinebot commented on GitHub (Nov 7, 2014):
Comment created by jasper@nerdsweide.nl:
PS: I've applied this fix to the 2.4 branch (in stead of master) on purpose, because I'm going to use this in a project and unfortunately can't wait until it's merged back into 2.4.
If this is a problem and must be done on master, I'll look into that.
@doctrinebot commented on GitHub (Nov 7, 2014):
Comment created by @ocramius:
[~jasper@nerdsweide.nl] multiple versions may be affected: we just need to be sure that the bug wasn't already fixed in
master(2.5), so please check that one as well.@doctrinebot commented on GitHub (Nov 7, 2014):
Comment created by jasper@nerdsweide.nl:
Master is also affected. I think I've got some spare time this evening, so I'll port the PR to master.
Could you perhaps look at the remaining issue and maybe give some hint on where I should start looking? I would appreciate it if I could finish that up too this evening.
@doctrinebot commented on GitHub (Nov 9, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1174] was closed:
https://github.com/doctrine/doctrine2/pull/1174
@doctrinebot commented on GitHub (Nov 10, 2014):
Comment created by jasper@nerdsweide.nl:
The PR has been ported to master:
http://www.doctrine-project.org/jira/browse/DDC-3380
https://github.com/doctrine/doctrine2/pull/1178
This ticket can be closed.
@doctrinebot commented on GitHub (Nov 10, 2014):
Issue was closed with resolution "Duplicate"
@doctrinebot commented on GitHub (Nov 10, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1174] was assigned:
https://github.com/doctrine/doctrine2/pull/1174
@doctrinebot commented on GitHub (Jan 17, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1178] was closed:
https://github.com/doctrine/doctrine2/pull/1178