Skip to content

Instantly share code, notes, and snippets.

@zhendi
Created April 28, 2012 07:26
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 zhendi/2516845 to your computer and use it in GitHub Desktop.
Save zhendi/2516845 to your computer and use it in GitHub Desktop.
> db.test.insert({a:1})
> db.test.find()
{ "_id" : ObjectId("4f9b9a90b59b4d1158a2d42d"), "a" : 1 }
> db.test.insert({b:1})
> db.test.find({_id: {$in: [ObjectId("4f9b9a90b59b4d1158a2d42d")]}})
{ "_id" : ObjectId("4f9b9a90b59b4d1158a2d42d"), "a" : 1 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment