diff --git a/src/index.js b/src/index.js index c866982..02f8c01 100644 --- a/src/index.js +++ b/src/index.js @@ -558,7 +558,7 @@ class Service extends AdapterService { if (count) { const countColumns = groupByColumns || (Array.isArray(this.id) ? this.id.map(idKey => `${this.Model.tableName}.${idKey}`) : [`${this.Model.tableName}.${this.id}`]); - const countQuery = this._createQuery(params).clear('groupBy'); + const countQuery = this._createQuery(params); if (query.$joinRelation) { countQuery