I need to do this.
select *
from person
where (firstname like '%a' or lastname like "%a") and id NOT IN (1 , 2)
node.js:
BegroupdUser.find({
limit: limit,
skip: skip,
where: {
id: { nin: adminIds },
or: [{
firstName: {like: '%' + _query + '%'}
}, {
lastName: {like: '%' + _query + '%'}
}]
}
}, function (errors, users) {
});
Try this
{
"where": {
"and": [
{
"id": {
"nin": adminIds
}
},
{
"or": [{
firstName: {like: '%' + _query + '%'}},
{
lastName: {like: '%' + _query + '%'}}
]
}
]
}
}