In one of my project I need to filter the instances that a column A is greater than a column B of the same model and I did not find in the documentation how to make a reference to other column within the query object.
I have tried the following query objects but none of them worked
this.$service("model").find({
query: {
A: {
$gte: "B"
}
}
});
this.$service("model").find({
query: {
A: {
$gte: {
col: "B"
}
}
}
});
this.$service("model").find({
query: {
A: {
$gte: {
$col: "B"
}
}
}
});
I have read that using sequelize.col could help but I don't know how to use it since I am requesting this from the frontend using websockets as transport.
Thanks in advance