I am trying to search for an meteor query for the following mondb query: db.stocks.find({"History.payment_transferred":false},{History:{$elemMatch: {payment_transferred:false}}})
Now this is supposed to work i assume as i saw helpful people suggesting in another thread. But i am getting the following error MinimongoError: Minimongo doesn't support operators in projections yet.
Does this have soemthing to do with auto publish ? Right now i am using it but i plan to remove it next week.
Any suggestion is much appreciated and Thank you in advance!!
A word of warning: you seem to be saying that History.payment_transferred can be either false, or an array. If that’s what you have done, such inconsistent typing is going to plague you further down the line.
I am actually looking for Meteor equilvalnt code for db.stocks.find({"History.payment_transferred":false},{History:{$elemMatch: {payment_transferred:false}}})
The above code works perfectly for Mongo Console. But the one for Meteor is not working.
You can query as you have, but return the whole History array document. Then just search for the matching array object with an alternative (for example using underscore findWhere). In Meteor server you should be able to query as you intended.