mirror of
https://github.com/Oreolek/yii2-nested-sets.git
synced 2024-06-26 03:30:46 +03:00
Added NestedSetsQueryBehavior::leaf() default sorting
This commit is contained in:
parent
20eff7758f
commit
0a99d1bdcd
|
@ -41,7 +41,7 @@ class NestedSetsQueryBehavior extends Behavior
|
|||
|
||||
$this->owner->andWhere(new Expression(
|
||||
$db->quoteColumnName($model->rightAttribute) . ' - ' . $db->quoteColumnName($model->leftAttribute) . ' = 1'
|
||||
));
|
||||
))->addOrderBy([$model->rightAttribute => SORT_ASC]);
|
||||
|
||||
return $this->owner;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue