I wanted to return field which matches all the query params using $and. It will only return true if it maches formId, respondent and receipient. How do we do this using $and in sequelize?. All must be true to return a result. Thank you.
const Request = await context.service.Model.findOne({
query: {
formId: 2,
respondentId: 252,
recipientId: 197,
},
});
Did where
not work?
const Request = await context.service.Model.findOne({
where: {
formId: 2,
respondentId: 252,
recipientId: 197,
},
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.