Sequelize error when using “where” and “in” on a subarray

前端 未结 5 1585
一整个雨季
一整个雨季 2021-02-02 06:22

This is my model definition:

var Tag = sequelize.define(\'Tag\', {
    name: Sequelize.STRING
});

var Event = sequelize.define(\'Event\', {
    name: Sequelize.         


        
5条回答
  •  悲哀的现实
    2021-02-02 06:47

    No need "in" property, sequelize auto define this. Just set array.

    Tag.findAll({
        where: {
            id: [1,2,3,4]
        }
    }).then(...)
    

提交回复
热议问题