Start a new topic

CollectionAccess query by id

Can anyone tell me why the following code returns no records? - I can query by any other field other than _id and it works. Wh at am I doing wrong?



modules.collectionAccess.collection("buildings").find( { "_id" : "521e140bf7e11df93e011711"} , function (err, object) { ...



Any Ideas?


That worked! Awesome! Thanks for your help!
Try modules.collectionAccess.objectID("521e140bf7e11df93e011711") instead of just "521e140bf7e11df93e011711".
Login or Signup to post a comment