Bug #26879

Clone of lazy objects in generic persistence does not initialize the cloned object

Added by Christopher Hlubek over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Target version:
-
Start date:
2011-05-18
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

With the LazyLoadingAspect on the __clone method, the object in thawProperties closure references still the original object after a clone. As a result, the cloned object is not initialized but marked as dirty and the persistence state is inconsistent.

As a workaround, the actual proxy in the aspect should be passed to the closure to fix the wrong reference in the case of a clone.

Also available in: Atom PDF