Created
May 4, 2013 23:24
-
-
Save dizda/5519127 to your computer and use it in GitHub Desktop.
MongoDB Add field to all documents without criteria
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.TheCollection.update({}, {$set:{'parent':true}}, {multi:true}); | |
// {} = empty selector |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment