Merge branch 'master' of https://github.com/yiisoft/yii2 into schema-cache-fixes

This commit is contained in:
brandonkelly
2017-04-27 10:35:30 -07:00
48 changed files with 380 additions and 97 deletions

View File

@ -276,9 +276,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
if (!$modelClass) {
return null;
}
/* @var $model \yii\db\ActiveRecord */
$model = new $modelClass;
$schema = $model->getTableSchema();
/* @var $modelClass \yii\db\ActiveRecord */
$schema = $modelClass::getTableSchema();
return array_keys($schema->columns);
}