From f3b713826977f52644912a6a3b091a9ef6c18169 Mon Sep 17 00:00:00 2001 From: Francis Lessard Date: Wed, 2 Mar 2016 21:34:17 -0500 Subject: [PATCH] Fix : remove query count limit Remove the limit on query count. By default the limit is 100. If you try to get the count of a collection and the collection has more than 100 rows, the result is always 100. --- src/Controllers/DatabaseController.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controllers/DatabaseController.js b/src/Controllers/DatabaseController.js index 91507ef83c..f7166c672e 100644 --- a/src/Controllers/DatabaseController.js +++ b/src/Controllers/DatabaseController.js @@ -501,6 +501,7 @@ DatabaseController.prototype.find = function(className, query, options = {}) { mongoWhere = {'$and': [mongoWhere, {'$or': orParts}]}; } if (options.count) { + delete mongoOptions.limit; return collection.count(mongoWhere, mongoOptions); } else { return collection.find(mongoWhere, mongoOptions)