mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进数据集对象的返回 由Query类select方法返回数据集对象 Connection类getResult方法不再进行数据集对象转换
This commit is contained in:
@@ -2312,6 +2312,9 @@ class Query
|
||||
}
|
||||
// 模型数据集转换
|
||||
$resultSet = (new $model)->toCollection($resultSet);
|
||||
} elseif ('collection' == $this->connection->getConfig('resultset_type')) {
|
||||
// 返回Collection对象
|
||||
$resultSet = new Collection($resultSet);
|
||||
}
|
||||
// 返回结果处理
|
||||
if (!empty($options['fail']) && count($resultSet) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user