Merge branch 'master' into db-traits

Updated AR classes with the latest changes from master to go on with
separation of AR query classes in traits.

Conflicts:
	framework/yii/db/ActiveQuery.php
	framework/yii/db/ActiveRecord.php
	framework/yii/db/ActiveRelation.php
This commit is contained in:
Carsten Brandt
2013-11-13 17:00:52 +01:00
390 changed files with 6862 additions and 20510 deletions

View File

@ -30,6 +30,12 @@ class ActiveRelation extends ActiveQuery
{
use \yii\ar\ActiveRelationTrait;
/**
* @var array|ActiveRelation the query associated with the pivot table. Please call [[via()]]
* or [[viaTable()]] to set this property instead of directly setting it.
*/
public $via;
/**
* Specifies the pivot table.
* @param string $tableName the name of the pivot table.
@ -72,7 +78,7 @@ class ActiveRelation extends ActiveQuery
$this->filterByModels($viaModels);
} elseif (is_array($this->via)) {
// via relation
/** @var $viaQuery ActiveRelation */
/** @var ActiveRelation $viaQuery */
list($viaName, $viaQuery) = $this->via;
if ($viaQuery->multiple) {
$viaModels = $viaQuery->all();