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']);