Browse Source

Fixes #1791.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
9d73048be9
  1. 6
      framework/yii/db/ActiveQuery.php

6
framework/yii/db/ActiveQuery.php

@ -249,9 +249,15 @@ class ActiveQuery extends Query implements ActiveQueryInterface
if (!empty($with)) {
foreach ($with as $name => $value) {
if (is_integer($name)) {
if (in_array($value, $this->with, true)) {
$this->with[] = $value;
}
} elseif (!isset($this->with[$name])) {
$this->with[$name] = $value;
}
}
}
return $this;
}

Loading…
Cancel
Save