Difference between these two update in robbery mongo 3t

0

What is the difference between these two, I had thought that by passing the multi option I would select all the documents that have match to do the update but only does it from the first one , anyway I think it is silly to use multi if I have the option to updateMany do not?

db.getCollection('collection').update({"rating":0},{$set:{"rating":1}}, {$multi:true})

db.getCollection('collection').updateMany({"rating":0},{$set:{"rating":1}})
    
asked by francisco dwq 03.04.2018 в 17:33
source

0 answers