mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #1178] Fixing associations using a value-conversion type as identifiers #9237
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?
Original Pull Request: https://github.com/doctrine/orm/pull/1178
State: closed
Merged: No
This is a port of #1174.
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.
Remaining issue
There are 2 tests that involve OneToOne and OneToMany associations with composite ids of which one is a foreign one. When the owning side is fetched from the DB, a Proxy object is created for the inversed side. But this Proxy contains incorrect identifiers:
Those question-marks represent 16 bytes of binary data. The thing is that
$foreignEntityshould contain another Proxy object (or perhaps the UUID of the foreign entity, I'm not sure).I'm at a loss here :( Hopefully someone can point me to where identity through foreign Entities is managed!