mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1033: Cloned proxies show unexpected behavior when initialized #1288
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 (Feb 14, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user k-fish:
When a proxy has been loaded and is cloned before being initialized, it will behave unexpectedly.
_load()in the proxy starts a chain of method calls that end up loading the data and putting it into the proxy being in the identity map inside UoW. Now the registered proxy will be updated, but the cloned copy will of course not be changed - except it will behave as if it was initialized. This leads (at least in my case) to changes not being picked up aftermerge()has been called.In my case I could work around this if I could ask the proxy to initialize itself (DDC-733). More transparent would be a
**clone()method in the proxy that initializes the proxy. This might also be related to DDC-18.@doctrinebot commented on GitHub (Feb 18, 2011):
Comment created by @beberlei:
This issue is rather tricky, since **clone is called AFTER the actual clone, on the CLONED object. What we need is before the clone on the original object. This is pretty problematic to solve, i have to wrap my head around it.
@doctrinebot commented on GitHub (Feb 26, 2011):
Comment created by @beberlei:
Fixed.
@doctrinebot commented on GitHub (Feb 26, 2011):
Issue was closed with resolution "Fixed"