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
I have to do very bad practice to fix this issue $categoryRoot = $this->createModel()->defaultOrder()->ancestorsOf($id)->first(); $entity = $this->find($id); if($deleted = $entity->delete()){ $categoryRoot->fixTree(); }
This solution make me not satisfied as it's use many queries , spent long execution time , and very risky
Activity
lazychaser commentedon Jan 23, 2018
Are you aplying
defaultOrder
when selecting nodes?mogahead commentedon Jan 23, 2018
I didn't select nodes , i just catch the entity then delete it
$deleted = $entity->delete();
mogahead commentedon Jan 25, 2018
@lazychaser
I have to do very bad practice to fix this issue
$categoryRoot = $this->createModel()->defaultOrder()->ancestorsOf($id)->first();
$entity = $this->find($id);
if($deleted = $entity->delete()){
$categoryRoot->fixTree();
}
This solution make me not satisfied as it's use many queries , spent long execution time , and very risky
fauziasakinah525 commentedon Oct 20, 2024
i fixing with