$or query is not working
zayn-m opened this issue · 2 comments
zayn-m commented
I'm writing $or query but it returns empty results.
const { user } = req;
user.id = '613706dd3661d31d5c05255d';
const query = {
$or: [{ buyer: user.id }, { 'oikos.user': user.id }],
};
const options = {
populate: {
path: 'oikos',
match: { user: user.id },
},
};
const transactions = await Transaction.paginate(query, options);;
return transactions;
aravindnc commented
Can you please confirm that the query runs without paginate plugin?
aravindnc commented
Feel free to reopen if this is a plugin issue.