From a00c2c522d57ab2b74fe181e37497811c5229420 Mon Sep 17 00:00:00 2001 From: Francis Lessard Date: Wed, 2 Mar 2016 16:16:23 -0500 Subject: [PATCH] Fix : remove 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 99ed564838..369b06953d 100644 --- a/src/Controllers/DatabaseController.js +++ b/src/Controllers/DatabaseController.js @@ -542,6 +542,7 @@ DatabaseController.prototype.find = function(className, query, options = {}) { mongoWhere = {'$and': [mongoWhere, {'$or': orParts}]}; } if (options.count) { + delete mongoOptions.limit; return coll.count(mongoWhere, mongoOptions); } else { return this.smartFind(coll, mongoWhere, mongoOptions)