From a9d585167210646040ea0fa294c26dc20cba504e Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 8 May 2017 23:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E5=AF=B9=E4=B8=80?= =?UTF-8?q?=E5=B5=8C=E5=A5=97=E5=85=B3=E8=81=94=E6=95=B0=E7=BB=84=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index f1e51a68..88fc23a1 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1902,6 +1902,9 @@ class Query $closure = $relation; $relation = $key; $with[$key] = $key; + } elseif (is_array($relation)) { + $subRelation = $relation; + $relation = $key; } elseif (is_string($relation) && strpos($relation, '.')) { $with[$key] = $relation; list($relation, $subRelation) = explode('.', $relation, 2);