-
Notifications
You must be signed in to change notification settings - Fork 368
Closed
Description
For some reason my limit filter is ignored (using mongodb connector).
Using the loopback-sandbox git, adding
datasources.json:
"db": {
"host": "localhost",
"database": "test",
"name": "db",
"connector": "mongodb",
"debug":true
},adding a post model, exposing a remote method for testing
module.exports = function (Post) {
Post.getNext = function (limit, cb) {
var context = loopback.getCurrentContext();
var http = context.get('http');
var user = context.get('currentUser');
console.log(limit)
Post.find({
limit: 1
}, cb);
};
Post.remoteMethod(
'getNext',
{
accepts: [{arg: 'limit', type: 'string', required: false},
],
returns: {arg: 'post', type: 'object'},
http: {path: '/getNext', verb: 'get'}
}
);
}the result ignores limit parameter and returns all items, always, even if hardcoded as in the example.
I am not sure where it went wrong or what would override it.
I am not able to debug since the debug flag has no effect at all as noted in #768
Metadata
Metadata
Assignees
Labels
No labels