Merge pull request #29 from mansuleman/master

Fix bug with sorting by id in redis adapter
This commit is contained in:
1602 2012-02-11 04:35:29 -08:00
commit bc814b435c
1 changed files with 4 additions and 2 deletions

View File

@ -243,8 +243,10 @@ BridgeToRedis.prototype.all = function all(model, filter, callback) {
orders = [filter.order];
}
orders.forEach(function (key) {
if (props[key].type.name !== 'Number' && props[key].type.name !== 'Date') {
allNumeric = false;
if (key !== 'id') {
if (props[key].type.name !== 'Number' && props[key].type.name !== 'Date') {
allNumeric = false;
}
}
sortCmd.push("BY", model + ":*->" + key);
});