From ce6d3195e6cba4097230f00583ef5f276ec018a9 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 11 Apr 2016 11:11:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index 92468325..c8c81f9c 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -295,7 +295,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess // 避免影响其它操作方法 $this->relation = []; // 保存关联对象值 - $this->data[$name] = $result; + $this->data[$relation] = $result; return $result; }