Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Invalid
-
Affects Version/s: Git Master
-
Fix Version/s: None
-
Component/s: ORM
-
Labels:None
Description
cascadeRemove incorrect work
UnitOfWork
in commit() (336)
// Entity deletions come last and need to be in reverse commit order
if ($this->entityDeletions) {
for ($count = count($commitOrder), $i = $count - 1; $i >= 0; --$i)
}
----------------------------------------------------------------
in doRemove (1630)
// Cascade first, because scheduleForDelete() removes the entity from the identity map, which
// can cause problems when a lazy proxy has to be initialized for the cascade operation.
$this->cascadeRemove($entity, $visited);
......
$this->scheduleForDelete($entity);
in array we get
child
child
parent
revert in commit - first remove parent and get foregein key error
if move cascadeRemove after switch all woork correct
patch