Closed genovese closed 3 years ago
I have a field that is an array of ObjectId's. To match objects whose field contains a given id, the mongo query works fine:
db.users.findOne({"arrayofIds": ObjectId("5b11af1ca7d3721b1417df6a")}) #=> returns the expected doc
The corresponding Monger query (and several variations) does not find anything:
(mc/find-one-as-map db "users" {:arrayofIds (ObjectId. "5b11af1ca7d3721b1417df6a")}) #=> nil
This is running under MongoDB 2.6.
Is this monger query incorrect? Is this a mismatch between Monger and the later versions of Mongo? Something else?
Thanks for your help!
P.S. Is Monger still being maintained?
Sorry; this seems to have been something wrong on my end. I restarted everything and now it's working. Apologies for the extraneous issue. Thanks.
I have a field that is an array of ObjectId's. To match objects whose field contains a given id, the mongo query works fine:
The corresponding Monger query (and several variations) does not find anything:
This is running under MongoDB 2.6.
Is this monger query incorrect? Is this a mismatch between Monger and the later versions of Mongo? Something else?
Thanks for your help!
P.S. Is Monger still being maintained?