Merge pull request #785 from flessard/master
Fix : remove query count limit
This commit is contained in:
@@ -524,6 +524,7 @@ DatabaseController.prototype.find = function(className, query, options = {}) {
|
|||||||
mongoWhere = {'$and': [mongoWhere, {'$or': orParts}]};
|
mongoWhere = {'$and': [mongoWhere, {'$or': orParts}]};
|
||||||
}
|
}
|
||||||
if (options.count) {
|
if (options.count) {
|
||||||
|
delete mongoOptions.limit;
|
||||||
return collection.count(mongoWhere, mongoOptions);
|
return collection.count(mongoWhere, mongoOptions);
|
||||||
} else {
|
} else {
|
||||||
return collection.find(mongoWhere, mongoOptions)
|
return collection.find(mongoWhere, mongoOptions)
|
||||||
|
|||||||
Reference in New Issue
Block a user