Commit 4ab5ce3b by Qiang Xue

Fixed join query for AR.

parent cf99fb92
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment