Allow null value in "in" operator
Allow null value in the "in" operator. This will help reducing code to query if a document has a specific ID or null.
Helpfull when you have documents connected to a organization and/or a project.
So you can filter
{ in: { path: "project", value: [null, ID] }}
Currently you have to filter this with a combination of filter, compound, should and equals with a minimumShouldMatch: 1.
{
compound: {
should: [
{
equals: {
path: 'project',
value: null,
},
},
{
equals: {
path: 'project',
value: req.project._id,
},
},
],
minimumShouldMatch: 1,
},
}
1
vote
