sequelize where with or code example
Example 1: sequelize and
{ where: { [Op.and]: [{ Col1: val1 }, { Col2: val2 }]} }
Example 2: include with where clause in sequelize
Document.findAll({
where: {'$employee.manager.id$': id},
include: [{
model: models.Employee,
required: true,
as: 'employee',
include: [{
model: models.Manager,
required: true,
as: 'manager',
where: { id: managerId },
}],
}],
Example 3: SEQUELIZE OR
"SELECT * FROM Student WHERE LastName='Doe' OR FirstName in ("John","Jane") OR Age>18"