-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
error in refresh tree after delete node #259
Comments
Are you aplying |
I didn't select nodes , i just catch the entity then delete it |
I have to do very bad practice to fix this issue |
i fixing with
// order first
public function getAllDescendants()
{
return $this->newQuery()
->where('_lft', '>', $this->_lft)
->where('_rgt', '<', $this->_rgt)
->orderBy('_lft')
->get();
}
//get, reserve and delete one by one
$descendants = $drive->getAllDescendants();
foreach ($descendants->reverse() as $descendant) {
DB::table('drives')->where('id', $descendant->id)->delete();
} |
|--node A
|----|node B
|----|---|node C
|----|node D
|----|node E
when delete node C , node D jump to be under node B , this according in error in lft && rgt off node D after refresh
The text was updated successfully, but these errors were encountered: