1
0
Fork 0
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:
Alexander Kochetov 2015-01-03 16:00:59 +03:00
parent 20eff7758f
commit 0a99d1bdcd

View file

@ -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;
}