June 2014
Intermediate to advanced
696 pages
38h 52m
English
There are several methods for updating documents when using Mongoose. Which one you use depends on the nature of your application. One method is simply to call the save() function described in the previous section. You can call the save() method on objects already created in the database.
The other method is to use update() on either the Document object for a single update or on the Model object to update multiple documents in the model. The advantages of the update() methods are that it can be applied to multiple objects, and it provides slightly better performance. The following sections describe these methods.
Read now
Unlock full access