diff --git a/library/think/db/Query.php b/library/think/db/Query.php index cd7a093b..2f37c000 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1678,7 +1678,7 @@ class Query * @param bool $subQuery 是否使用子查询 * @return $this */ - public function withCount($relation, $subQuery = false) + public function withCount($relation, $subQuery = true) { if (!$subQuery) { $this->options['with_count'] = $relation;