Fix sorting by id in redis
This commit is contained in:
parent
8e1ff15589
commit
4b9cd8e678
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue