Clone of lazy objects in generic persistence does not initialize the cloned object
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.