From 1839123bcdb17586e54ac5c0bf6d60189ea83afb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 22 Nov 2016 17:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=9A=84all=E5=92=8Cselect?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=94=AF=E6=8C=81=E8=8E=B7=E5=8F=96=E5=99=A8?= 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 a46bbed4..7505b5be 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1966,9 +1966,9 @@ class Query // 生成模型对象 $model = $this->model; foreach ($resultSet as $key => $result) { - /** @var Model $result */ - $result = new $model($result); - $result->isUpdate(true); + $result = new $model; + // 支持获取器 + $result->data($result, true)->isUpdate(true); // 关联查询 if (!empty($options['relation'])) { $result->relationQuery($options['relation']);