Add alias for skip/offet (mongoose)

This commit is contained in:
Anatoliy Chakkaev 2012-02-03 04:15:01 +08:00 committed by Amir M. Mahmoudi
parent a34d277ef8
commit 5547a3acbe
1 changed files with 2 additions and 0 deletions

View File

@ -145,6 +145,8 @@ MongooseAdapter.prototype.all = function all(model, filter, callback) {
}
if (filter.skip) {
query.skip(filter.skip);
} else if (filter.offset) {
query.skip(filter.offset);
}
query.exec(function (err, data) {
if (err) return callback(err);