mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
thinkphp/library/think/model.php
修复find()函数,关联模型失效问题
This commit is contained in:
@@ -662,7 +662,7 @@ class Model
|
|||||||
return $resultSet;
|
return $resultSet;
|
||||||
}
|
}
|
||||||
// 数据处理
|
// 数据处理
|
||||||
$data = $this->_read_data($resultSet[0]);
|
$data = $this->_read_data($resultSet[0], $options);
|
||||||
// 数据对象赋值
|
// 数据对象赋值
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
if (isset($cache)) {
|
if (isset($cache)) {
|
||||||
@@ -677,7 +677,7 @@ class Model
|
|||||||
* @param array $data 当前数据
|
* @param array $data 当前数据
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function _read_data($data)
|
protected function _read_data($data, $options)
|
||||||
{
|
{
|
||||||
// 检查字段映射
|
// 检查字段映射
|
||||||
if (!empty($this->map)) {
|
if (!empty($this->map)) {
|
||||||
@@ -688,7 +688,7 @@ class Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->_after_find($data);
|
$this->_after_find($data, $options);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
// 数据读取成功后的回调方法
|
// 数据读取成功后的回调方法
|
||||||
|
|||||||
Reference in New Issue
Block a user