We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2da5f44 commit 7a1b961Copy full SHA for 7a1b961
packages/knex/src/adapter.ts
@@ -166,9 +166,10 @@ export class KnexAdapter<
166
async _find(params?: ServiceParams): Promise<Paginated<Result> | Result[]>
167
async _find(params: ServiceParams = {} as ServiceParams): Promise<Paginated<Result> | Result[]> {
168
const { filters, paginate } = this.filterQuery(params)
169
- const { Model, name, id } = this.getOptions(params)
+ const { name, id } = this.getOptions(params)
170
const builder = params.knex ? params.knex.clone() : this.createQuery(params)
171
- const countBuilder = Model.count(`* as total`)
+ const countBuilder = this.db()
172
+ .count(`* as total`)
173
.with('subquery', builder.clone().clearOrder())
174
.from('subquery')
175
// Handle $limit
0 commit comments