diff --git a/lib/adapters/mongoose.js b/lib/adapters/mongoose.js index 2609d638..c541a621 100644 --- a/lib/adapters/mongoose.js +++ b/lib/adapters/mongoose.js @@ -164,9 +164,9 @@ MongooseAdapter.prototype.all = function all(model, filter, callback) { if (m[1] === 'DE') reverse = true; } if (reverse) { - query.desc(key); + query.sort('-' + key); } else { - query.asc(key); + query.sort(key); } } if (filter.limit) { diff --git a/package.json b/package.json index ffdfc967..6b60de0c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "coffee-script": ">= 1.2.0", "nodeunit": ">= 0.6.4", "redis": ">= 0.6.7", - "mongoose": ">= 2.2.3", + "mongoose": "latest", "mysql": ">= 0.9.4", "pg": "latest", "sqlite3": ">= 2.0.18",