From 4381accdaf9277f1af12228997faa70e65dac321 Mon Sep 17 00:00:00 2001 From: liuzhaowei55 Date: Wed, 16 Dec 2015 14:07:24 +0800 Subject: [PATCH] thinkphp/library/think/model.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复find()函数,关联模型失效问题 --- library/think/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/model.php b/library/think/model.php index ddc4ca85..3ce0dc2d 100644 --- a/library/think/model.php +++ b/library/think/model.php @@ -662,7 +662,7 @@ class Model return $resultSet; } // 数据处理 - $data = $this->_read_data($resultSet[0]); + $data = $this->_read_data($resultSet[0], $options); // 数据对象赋值 $this->data = $data; if (isset($cache)) { @@ -677,7 +677,7 @@ class Model * @param array $data 当前数据 * @return array */ - protected function _read_data($data) + protected function _read_data($data, $options) { // 检查字段映射 if (!empty($this->map)) { @@ -688,7 +688,7 @@ class Model } } } - $this->_after_find($data); + $this->_after_find($data, $options); return $data; } // 数据读取成功后的回调方法