I want to make the condition
(A AND B) And (C Or D Or E Or F)
When I try to do
where: {
[Op.and]: [{
A,
B,
[Op.or]: [{
C,
D,
E,
F
}]
}]
}
This operation will just return A And B AND C AND D AND E AND F, for some reason Op.or just fails within Op.and. Maybe there is a better way to do the logical operation, would anyone know what do?
Try below,
where: {
[Op.and]: [
{
A
},
{
B
},
{
[Op.or]: [{
C,
D,
E,
F
}]
}
]
}
See the syntax for [Op.and]
here.
I fixed this problem by getting rid of the arrays, for some reason they were interfering in the interpretation. I guess you're not allowed to wrap Op.or with Op.and
[Op.and]: {
A',
B,
[Op.or]: {
C,
D,
E,
F
},
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With