改进关联预载入查询 两个相同模型查询的问题

This commit is contained in:
thinkphp
2016-06-27 23:29:33 +08:00
parent 0295340e4b
commit 9ca4911c44
2 changed files with 5 additions and 6 deletions

View File

@@ -1466,7 +1466,7 @@ class Query
unset($this->options['with_field']);
}
}
$this->field($field, false, $joinTable, $joinAlias, $joinName . '__');
$this->field($field, false, $joinTable, $joinAlias, $relation . '__');
$i++;
} elseif ($closure) {
$with[$key] = $closure;