Following example:
root
child0
child1
child2
child3
If you try to delete child2 and child3 there is no problem.
If you try to delete node child0 or child1 it won't work.
The problem is the ordering of this query:
delete from tags where lft > 17 and rgt < 30 order by tags.lft asc
(Note: I delete records like suggested in the documentation:
Tag::find($myId)->delete();
Which results in something like this:
General error: 1032 Can't find record in 'tags'
Why do you sort those elements if you delete them? I don't see any advantage.
If you remove the sorting, there wouldn't be an issue.
Hello,
there is a problem when deleting nodes.
Following example: root child0 child1 child2 child3
If you try to delete child2 and child3 there is no problem. If you try to delete node child0 or child1 it won't work. The problem is the ordering of this query: delete from
tags
wherelft
> 17 andrgt
< 30 order bytags
.lft
asc(Note: I delete records like suggested in the documentation:
Tag::find($myId)->delete();
Which results in something like this: General error: 1032 Can't find record in 'tags'
Why do you sort those elements if you delete them? I don't see any advantage. If you remove the sorting, there wouldn't be an issue.