From 04fdf632fbb7b3a0f8d1eea39f49ab3a1cbc3afc Mon Sep 17 00:00:00 2001 From: Nick Schot Date: Mon, 27 Aug 2018 11:57:36 +0200 Subject: [PATCH] fix: the `count` method did not account for whereRaw and whereBetween queries setting incorrect pagination numbers (total) in the JSONAPI response --- src/packages/database/query/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/database/query/index.js b/src/packages/database/query/index.js index 7e672746..2d6c9bdd 100644 --- a/src/packages/database/query/index.js +++ b/src/packages/database/query/index.js @@ -298,7 +298,7 @@ class Query<+T: any> extends Promise { } count(): Query { - const validName = /^(where(Not)?(In)?)$/g; + const validName = /^(where(((Not)?(In)?)|(Raw)|(Between)))$/g; Object.assign(this, { shouldCount: true,