You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UnitOfWork relies on spl_object_hash being unique. However if an object gets destroyed (garbage collected), a new object can receive the same spl_object_hash.
I'm seeing a case where an object has been recycled, but the $documentStates map inside of lib/Doctrine/ODM/MongoDB/UnitOfWork.php still contains a reference to that object.
So when a new object is created and attempted to be saved, UnitOfWork thinks it's not new, causing quite the problem...
The text was updated successfully, but these errors were encountered:
@mmucklo any chance you could provide a failing test case? Theory is, that UnitOfWork keeps reference to each managed document (embedded documents included) which effectively will prevent that object to be picked by a garbage collector. If there is a scenario that doesn't clean everything it should, we should fix that.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.
UnitOfWork relies on spl_object_hash being unique. However if an object gets destroyed (garbage collected), a new object can receive the same spl_object_hash.
http://php.net/manual/en/function.spl-object-hash.php
I'm seeing a case where an object has been recycled, but the $documentStates map inside of lib/Doctrine/ODM/MongoDB/UnitOfWork.php still contains a reference to that object.
So when a new object is created and attempted to be saved, UnitOfWork thinks it's not new, causing quite the problem...
The text was updated successfully, but these errors were encountered: