Skip to content

GetAncestors sorts only by OrderColumn not by depth first #5

@barremob

Description

@barremob

getAncestors returns collection sorted by OrderColumn but this should first be sorted by Depth I believe.
Because the order of the node is depth depending. Currently the root node is last in the collection.
But this should be the first item in the collection.

public function newMaterializedPathQuery(): Builder
    {
        return $this->newQuery()
            ->orderBy($this->getQualifiedDepthColumnName())
            ->orderBy($this->getQualifiedOrderColumnName());
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions