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

前端 未结 5 1586
一整个雨季
一整个雨季 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:49

    Updated example for Sequelize v5:

    await Tag.findAll({
      where: {
        id: {
          [Sequelize.Op.in]: [1, 2, 3, 4]
        }
      }
    });
    

提交回复
热议问题