Is it possible to define a relationships in sequelize where multiple foreign keys are stored as an array in one field. Basically a belongsToMany but instead of an relation t
To get sequelize query result with where condition for given array with using **Op.in**
code to find result with in array as
var Sequelize = require('sequelize');
var Op = Sequelize.Op;
var arrayofTaskId = ['123', '456', '789'];
Tasks.findAll({
where: {
task_id: {
[Op.in]: arrayofTaskId
}
}
}).then(function(result) {
return res.json(result)
});