mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1546] Fix proxy erased by hydratation #9603
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/1546
State: closed
Merged: No
This PR fixe a edge case when hydrating an existing object which already has a proxy to différente entity.
Imagine the entity
When a instance of
Userhas an address created with aProxy, then, the hydratation of an other instance of the sameUserwill replace the content of the fieldaddressin this instance.Such situation append with a PUT call with the DunglasApiBundle and the validator UniqueEntity from Symfony which trigger a
$repository->findon the object.identityMapof theuowHow to reproduce: