public function ancestorsOf(ChildCategory $category)
    {
        return $this
            ->addUsingAlias(ChildCategory::LEFT_COL, $category->getLeftValue(), Criteria::LESS_THAN)
            ->addUsingAlias(ChildCategory::RIGHT_COL, $category->getRightValue(), Criteria::GREATER_THAN);
    }
public function ancestorsOf(ChildCategory $category)
    {
        return $this
            ->addUsingAlias(ChildCategory::LEFT_COL, $category->getLeftValue(), Criteria::LESS_THAN)
            ->addUsingAlias(ChildCategory::RIGHT_COL, $category->getRightValue(), Criteria::GREATER_THAN);
    }
public function ancestorsOf ( ChildCategory $ category ) { return $ this -> addUsingAlias ( ChildCategory :: LEFT_COL , $ category -> getLeftValue ( ) , Criteria :: LESS_THAN ) -> addUsingAlias ( ChildCategory :: RIGHT_COL , $ category -> getRightValue ( ) , Criteria :: GREATER_THAN ) ; }
Filter the query to restrict the result to ancestors of an object

@param     ChildCategory $category The object to use for ancestors search

@return    $this|ChildCategoryQuery The current query, for fluid interface
Filter the query to restrict the result to ancestors of an object