From ee5ef96aacb6d4917d7f2393ed09c140f5a8caeb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 22 Nov 2016 17:22:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 7505b5be..88c12e0d 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1966,14 +1966,14 @@ class Query // 生成模型对象 $model = $this->model; foreach ($resultSet as $key => $result) { - $result = new $model; + $obj = new $model; // 支持获取器 - $result->data($result, true)->isUpdate(true); + $obj->data($result, true)->isUpdate(true); // 关联查询 if (!empty($options['relation'])) { $result->relationQuery($options['relation']); } - $resultSet[$key] = $result; + $resultSet[$key] = $obj; } if (!empty($options['with']) && $result instanceof Model) { // 预载入