From d825b745c3046504dcd4f462964a3cde9e636f31 Mon Sep 17 00:00:00 2001
From: Carsten Brandt <mail@cebe.cc>
Date: Wed, 25 Jun 2014 12:56:26 +0200
Subject: [PATCH] added note about default order

fixes #4042
---
 docs/guide/output-data-widgets.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/guide/output-data-widgets.md b/docs/guide/output-data-widgets.md
index 4537477..165ff4f 100644
--- a/docs/guide/output-data-widgets.md
+++ b/docs/guide/output-data-widgets.md
@@ -387,6 +387,13 @@ $query->andFilterWhere(['LIKE', 'author.name', $this->getAttribute('author.name'
 >      'desc' => ['au.name' => SORT_DESC],
 > ];
 > ```
+>
+> Also when specifying the [[yii\data\Sort::defaultOrder|defaultOrder]] for sorting you need to use the relation name
+> instead of the alias:
+>
+> ```php
+> $dataProvider->sort->defaultOrder = ['author.name' => SORT_ASC];
+> ```
 
 > Info: For more information on `joinWith` and the queries performed in the background, check the
 > [active record docs on eager and lazy loading](active-record.md#lazy-and-eager-loading).
--
libgit2 0.27.1