Open Prince2k3 opened 4 years ago
Describe the bug
Hello!
I'm experiencing an issue with the pagination.
As example when I have code like this
... .paginate(on: request, response: APIPaginated.self) { builder in if let fromDate = fromDate { return builder .filter(\.userId == userId) .filter(\.closed == false) .filter(\.createdAt >= fromDate) .sort(\.createdAt) .all() } else { return builder .filter(\.userId == userId) .filter(\.closed == false) .sort(\.createdAt) .all() } }
Things work but the total is the wrong total and not based on the filtered total.
Steps To Reproduce Steps to reproduce the behavior:
Expected behavior I expect that when I query and filter the db the total would reflect the total after filtering
Version Information
Describe the bug
Hello!
I'm experiencing an issue with the pagination.
As example when I have code like this
Things work but the total is the wrong total and not based on the filtered total.
Steps To Reproduce Steps to reproduce the behavior:
Expected behavior I expect that when I query and filter the db the total would reflect the total after filtering
Version Information