Browse Source

Fixed join query for AR.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
4ab5ce3b5e
  1. 3
      yii/db/ActiveQuery.php

3
yii/db/ActiveQuery.php

@ -236,6 +236,9 @@ class ActiveQuery extends Query
if ($this->sql === null) {
if ($this->from === null) {
$tableName = $modelClass::tableName();
if ($this->select === null && !empty($this->join)) {
$this->select = array("$tableName.*");
}
$this->from = array($tableName);
}
/** @var $qb QueryBuilder */

Loading…
Cancel
Save