@@ -430,12 +430,12 @@ private function buildAncestorsQuery(Builder $builder, $id, $withSelf)
430430 return $ builder
431431 ->join (
432432 $ this ->closure ->getTable (),
433- $ this ->closure ->getAncestorColumn (),
433+ $ this ->closure ->getQualifiedAncestorColumn (),
434434 '= ' ,
435435 $ this ->getQualifiedKeyName ()
436436 )
437- ->where ($ this ->closure ->getDescendantColumn (), '= ' , $ id )
438- ->where ($ this ->closure ->getDepthColumn (), $ depthOperator , 0 );
437+ ->where ($ this ->closure ->getQualifiedDescendantColumn (), '= ' , $ id )
438+ ->where ($ this ->closure ->getQualifiedDepthColumn (), $ depthOperator , 0 );
439439 }
440440
441441 /**
@@ -563,12 +563,12 @@ private function buildDescendantsQuery(Builder $builder, $id, $withSelf)
563563 return $ builder
564564 ->join (
565565 $ this ->closure ->getTable (),
566- $ this ->closure ->getDescendantColumn (),
566+ $ this ->closure ->getQualifiedDescendantColumn (),
567567 '= ' ,
568568 $ this ->getQualifiedKeyName ()
569569 )
570- ->where ($ this ->closure ->getAncestorColumn (), '= ' , $ id )
571- ->where ($ this ->closure ->getDepthColumn (), $ depthOperator , 0 );
570+ ->where ($ this ->closure ->getQualifiedAncestorColumn (), '= ' , $ id )
571+ ->where ($ this ->closure ->getQualifiedDepthColumn (), $ depthOperator , 0 );
572572 }
573573
574574 /**
0 commit comments