mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-23 04:00:23 +08:00
Fixes #1791
This commit is contained in:
@ -243,10 +243,16 @@ class ActiveQuery extends Query implements ActiveQueryInterface
|
||||
unset($with[$name]);
|
||||
}
|
||||
}
|
||||
$this->with($with);
|
||||
} elseif ($eagerLoading) {
|
||||
$this->with($with);
|
||||
} elseif (!$eagerLoading) {
|
||||
$with = [];
|
||||
}
|
||||
|
||||
if (!empty($with)) {
|
||||
foreach ($with as $name => $value) {
|
||||
$this->with[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user