That's it for this module,
again we learned quite a lot,
we had a detailed look at update one and update many. Update one and many can be used to update
guess what,
one or more documents in a collection.
As a first argument, these methods take a filter, a query selector which narrows down which document or
documents to update
and then in the second argument, you can describe the update with the help of update operators, like
$set.
Now I didn't dive into it in this module but I covered it earlier in this course,
there also is the option to entirely replace a document with the old update method, so not update one
or many but just update or with replace one,
so if you have a use case where you need to replace the entire document and just keep its ID, you can
do that too.
Now back to the update operators though, you learned about a lot of different update operators for updating
the fields, with $set, inc, min and so on.
Now if you work with arrays, you should definitely take advantage of the different shortcuts like $,
$[] or dollar with the identifier and then the array filters key or configuration
you add to the third argument of update many or update one, where you could also add upsert and so
on.
So this is something you should keep in mind
and of course use the array update operators like $push or $pop. This allow you
to efficiently add or remove elements to or from arrays.