diff --git a/library/think/db/Query.php b/library/think/db/Query.php index b6ad8ff8..4d63ba14 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1985,7 +1985,7 @@ class Query } if (!empty($options['with']) && $result instanceof Model) { // 预载入 - $resultSet = $result->eagerlyResultSet($resultSet, $options['with'], is_object($resultSet) ? get_class($resultSet) : ''); + $result->eagerlyResultSet($resultSet, $options['with'], is_object($resultSet) ? get_class($resultSet) : ''); } } } elseif (!empty($options['fail'])) { diff --git a/library/think/model/relation/HasManyThrough.php b/library/think/model/relation/HasManyThrough.php index 8f76f573..2661b7b3 100644 --- a/library/think/model/relation/HasManyThrough.php +++ b/library/think/model/relation/HasManyThrough.php @@ -13,6 +13,7 @@ namespace think\model\relation; use think\Db; use think\db\Query; +use think\Loader; use think\Model; use think\model\Relation;