I am using insertMany() to add data to a collection which works successfully - However, some underlying mechanism is messing up the types. When I try to use $inc on one of the documents added, it says nonnumeric type (athough the type is numberInt)
What’s most strange about this situation is that if I manually update the fields, the problem is solved. If I don’t manualy update, they don’t appear in the search results… But I update, change nothing, and voila.
For context, the documents have a field “status” which is set to 2, ($numberInt) - I have a cron constantly looking for documents with {“status”: 2} that updates status to 6 (and this never fails, except in this case, where even though status is 2 it never changes unless I ‘update’)
When I try to update in the shell, it fails with “Cannot apply $inc to a value of non-numeric type. {_id: ObjectId(’ excluded ')} has the field ‘status’ of non-numeric type object”" but even on the webapp I can see that the status field is properly set to numberInt
thanks!