The Sequelize docs show:
Post.findAll({
where: sequelize.where(sequelize.fn('char_length', sequelize.col('status')), 6)
});
My query:
models.appointment.findAll({
where: Sequelize.where(Sequelize.fn('char_length', Sequelize.col('department')), 6)
})
Is throwing an error:
Unhandled rejection Error: Invalid value Where {
attribute: Fn { fn: 'lower', args: [ [Object] ] },
comparator: '=',
logic: 6 }
With Sequelize v4.42.x (newest) and mysql. Why would this query be throwing an error like this?