From 5da3b9135ff961dcebf4fe5a99013fad125229eb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 25 Apr 2016 14:17:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3relation=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/Relation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/model/Relation.php b/library/think/model/Relation.php index b17d3e75..f84d44b6 100644 --- a/library/think/model/Relation.php +++ b/library/think/model/Relation.php @@ -103,7 +103,7 @@ class Relation break; default: // 直接返回 - $result = $model; + $result = $relation; } return $result; } @@ -536,7 +536,7 @@ class Relation * @param bool $relationDel 是否同时删除关联表数据 * @return integer */ - public function detach($data, $relatinDel = false) + public function detach($data, $relationDel = false) { if (is_array($data)) { $id = $data;