mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 21:41:36 +08:00
Model类增加resultSetType属性 用于指定模型查询的数据集对象(默认为空返回数组) Db类查询不再支持设置自定义数据集对象(只能使用数组或者think\Collection)
This commit is contained in:
@@ -489,10 +489,7 @@ abstract class Connection
|
||||
$result = $this->PDOStatement->fetchAll($this->fetchType);
|
||||
$this->numRows = count($result);
|
||||
|
||||
if (!empty($class)) {
|
||||
// 返回指定数据集对象类
|
||||
$result = new $class($result);
|
||||
} elseif ('collection' == $this->resultSetType) {
|
||||
if ('collection' == $this->resultSetType) {
|
||||
// 返回数据集Collection对象
|
||||
$result = new Collection($result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user