This commit is contained in:
2024-04-26 15:15:36 +08:00
parent b9750d743b
commit 8acf74c9ed
+1 -1
View File
@@ -154,7 +154,7 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
*/ */
public function count(): int public function count(): int
{ {
return $this->buildCommand($this->select(['count(*)'])->builder->count())->rowCount(); return $this->buildCommand((clone $this)->select(['count(*)'])->builder->count())->rowCount();
} }