yiisoft/yii2 — pull request #4570 by stepanselyuk (2014-08-01 21:10:29+00:00)
Title: $alias and Handling $query->joinWith called inside of other $query->joinWith

1. Added property $alias for set the alias for the $modelClass table name.

2. Handling $query->joinWith called inside of other $query->joinWith within Closure (called inside Closure). Ex.:
```php
$query->joinWith( [ 'rel1' => function($query) {
$query->joinWith( [ 'rel2' => function($query) {
// ...
} ] );
} ] );
```