mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
模型的all和select方法支持获取器
This commit is contained in:
@@ -1966,9 +1966,9 @@ class Query
|
|||||||
// 生成模型对象
|
// 生成模型对象
|
||||||
$model = $this->model;
|
$model = $this->model;
|
||||||
foreach ($resultSet as $key => $result) {
|
foreach ($resultSet as $key => $result) {
|
||||||
/** @var Model $result */
|
$result = new $model;
|
||||||
$result = new $model($result);
|
// 支持获取器
|
||||||
$result->isUpdate(true);
|
$result->data($result, true)->isUpdate(true);
|
||||||
// 关联查询
|
// 关联查询
|
||||||
if (!empty($options['relation'])) {
|
if (!empty($options['relation'])) {
|
||||||
$result->relationQuery($options['relation']);
|
$result->relationQuery($options['relation']);
|
||||||
|
|||||||
Reference in New Issue
Block a user