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);