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.
This commit is contained in:
Francis Lessard
2016-03-02 21:34:17 -05:00
parent d8d374379d
commit f3b7138269

View File

@@ -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)