Skip to content

Commit

Permalink
Set attributes for count
Browse files Browse the repository at this point in the history
  • Loading branch information
DaddyWarbucks committed Feb 29, 2024
1 parent 40faf74 commit 580ee7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ export class SequelizeAdapter<
try {
if (paginate && paginate.default) {
if (q.limit === 0) {
const total = await Model.count(q);
const total = await Model.count({
...q,
attributes: undefined
});
return {
total,
limit: q.limit,
Expand Down

0 comments on commit 580ee7f

Please sign in to comment.