DDC-1033: Cloned proxies show unexpected behavior when initialized #1622

Closed
doctrinebot opened this Issue Feb 14, 2011 · 3 comments

2 participants

@doctrinebot

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 after merge() 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

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

Comment created by @beberlei:

Fixed.

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0.2 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment