diff --git a/src/Franzose/ClosureTable/Models/Entity.php b/src/Franzose/ClosureTable/Models/Entity.php index 7e854c9..110836c 100644 --- a/src/Franzose/ClosureTable/Models/Entity.php +++ b/src/Franzose/ClosureTable/Models/Entity.php @@ -1430,7 +1430,7 @@ public function deleteSubtree($withSelf = false, $forceDelete = false) { $action = ($forceDelete === true ? 'forceDelete' : 'delete'); - $ids = $this->joinClosureBy('descendant', $withSelf)->pluck($this->getKeyName()); + $ids = $this->joinClosureBy('descendant', $withSelf)->pluck($this->getQualifiedKeyName()); if ($forceDelete) { $this->closure->whereIn($this->closure->getDescendantColumn(), $ids)->delete();