Friday, 18 September 2015

MongoDB update sql




if you want to run update sql on mongodb, you should:


db['1.app'].update({}, {$set:{"lastStatus" : "app-status-300-good" }}, {multi :true})


without {multi :true} the change will only be applied to one document.

$set is very  important.







No comments:

Post a comment