改进Query类with方法

This commit is contained in:
thinkphp
2017-02-23 18:25:20 +08:00
parent d85579faf8
commit 138f48498e
2 changed files with 1 additions and 4 deletions

View File

@@ -1895,7 +1895,7 @@ class Query
$relation = Loader::parseName($relation, 1, false);
$model = $class->$relation();
if ($model instanceof OneToOne && 0 == $model->getEagerlyType()) {
$model->eagerly($this, $relation, $subRelation, $closure, $first);
$model->removeOption()->eagerly($this, $relation, $subRelation, $closure, $first);
$first = false;
} elseif ($closure) {
$with[$key] = $closure;