For some reason I can't find a document when I search by the id of a nested document. I can perform other finds easily enough so these two work:
User.findOne({"_id" : some_id}, function(err,user){}
User.findOne({"arrayOfNestedDocs.value":someValue}, function(err,user){}
But finding by id of nested doc doesn't work:
User.findOne({"arrayOfNestedDocs._id" : some_id}, function(err,user){}
I can perform the search in a mongo shell so but not via mongoose. Any ideas would be helpful.