I have a document such as:
{ _id: 4e69bbedee97560001000011,
case_id: '5', ... }
If I do:
Case.find {_id : "4e69bbedee97560001000011"}, (err,docs) ->
docs.forEach (item, i) ->
console.log item
It works fine but if I do:
Case.find {case_id : "5"}, (err,docs) ->
docs.forEach (item, i) ->
console.log item
It doesn't. case_id
is a string. Why is this not working? Thanks
It works when I use the mongo console:
db.case_notebooks.find({"case_id" : 5})
{ "_id" : ObjectId("4e69bbedee97560001000011"), "case_id" : 5, "notes" : [