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
Activity
| Field | Original Value | New Value |
|---|---|---|
| Description |
cascadeRemove incorrect work
in commit // 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) { $this->executeDeletions($commitOrder[$i]); } } ---------------------------------------------------------------- in doRemove // 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 |
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) { $this->executeDeletions($commitOrder[$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 |
| Attachment | DDC2112.patch [ 11341 ] |
| Priority | Critical [ 2 ] | Minor [ 4 ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Invalid [ 6 ] |