Skip to content

Instantly share code, notes, and snippets.

@orospakr
Last active December 17, 2015 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orospakr/5638498 to your computer and use it in GitHub Desktop.
Save orospakr/5638498 to your computer and use it in GitHub Desktop.
Why wouldn't:
db.my_collection.find({"shinies": {$elemMatch : { value1 : { "kases": {$exists : true } } } } } )
match the following document?
{
"_id" : ObjectId("50f4908c75c10260ce8c47e9"),
"shinies" : [
{
"kases" : [ "woot", stuff" ]
},
],
"other_stuff" : 7
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment