Reputation: 1263
I have the following query:
@CountQuery("{$and:[" +
"{ 'active' : true }," +
"{ 'budget' : { $ne: { $size: 0 } } }" +
"]}")
Integer countByBudgets();
and this document:
{
id: ...,
active: true,
budget: []
}
And the query above is returning 1 when it should return 0 as the budget
field has no values.
What am I doing wrong?
Thanks
Upvotes: 0
Views: 622
Reputation: 1263
Okay, changing the following part worked:
"{ 'budget' : { $ne: [] } }"
Upvotes: 1