我正在使用sequalize.js,我在处理订单语句时遇到麻烦,我想先通过if id(如果我的id在该别名表中)进行订购,然后再进行另一订购。...
order = [['alias', 'id'], /*[this order statement already works]*/]
include = [
{
model: model.aliasTable,
as: 'alias'
}
]
//['alias', 'id'] this is what is not working in my order statement
答案 0 :(得分:0)
尝试order: [['alias', 'DESC'], ['id', 'DESC']]