Skip to content

Commit f3b7138

Browse files
author
Francis Lessard
committed
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.
1 parent d8d3743 commit f3b7138

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Controllers/DatabaseController.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ DatabaseController.prototype.find = function(className, query, options = {}) {
501501
mongoWhere = {'$and': [mongoWhere, {'$or': orParts}]};
502502
}
503503
if (options.count) {
504+
delete mongoOptions.limit;
504505
return collection.count(mongoWhere, mongoOptions);
505506
} else {
506507
return collection.find(mongoWhere, mongoOptions)

0 commit comments

Comments
 (0)