more docs about joinwith()

This commit is contained in:
Qiang Xue
2013-12-24 09:29:05 -05:00
parent 08ef80a2ae
commit dc720d9bf4
2 changed files with 49 additions and 6 deletions

View File

@ -220,9 +220,13 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* ])->all();
* ```
*
* @param bool $eagerLoading
* @param string $joinType
* @return $this
* @param boolean|array $eagerLoading whether to eager load the relations specified in `$with`.
* When this is a boolean, it applies to all relations specified in `$with`. Use an array
* to explicitly list which relations in `$with` need to be eagerly loaded.
* @param string|array $joinType the join type of the relations specified in `$with`.
* When this is a string, it applies to all relations specified in `$with`. Use an array
* in the format of `relationName => joinType` to specify different join types for different relations.
* @return static the query object itself
*/
public function joinWith($with, $eagerLoading = true, $joinType = 'INNER JOIN')
{