最佳答案
                                        
                                                                        
                                我试图输出所有的对象列表从数据库与序列如下,并希望得到的数据被排序,因为我添加了 id 在 where 子句。
exports.getStaticCompanies = function () {
return Company.findAll({
where: {
id: [46128, 2865, 49569,  1488,   45600,   61991,  1418,  61919,   53326,   61680]
},
attributes: ['id', 'logo_version', 'logo_content_type', 'name', 'updated_at']
});
};
但是问题是在渲染之后,所有的数据按照如下方式进行排序。
46128, 53326, 2865, 1488, 45600, 61680, 49569, 1418, ....
正如我所发现的,它既不按 ID 也不按名称排序。请帮助我如何解决它。