I'm experiencing a strange problem in Mongoose related to find queries. When I run the query below, I get a variable number of results. I will get a consistent 210 results when querying in Mongo, but usually get between 198-210 results when doing the same thing through Mongoose. I've tried the query with and without indexes set.
Any suggestions on what might be causing this would be greatly appreciated.
Customer Model:
subscriptions: [ { renewal: { type: Boolean, default: false } } ] Query
Customer.find({ "subscriptions.renewal": true }, {}, { timeout: false })
renewal: type: Boolean default: falseis not proper JavaScript as far as I know. you seem to be mussing{}