Parameters
- doc «Object»
[options.lean] «Object» if truthy, mongoose will return the document as a plain JavaScript object rather than a mongoose document. See and the Mongoose lean tutorial.
[options.omitUndefined=false] «Boolean» If true, delete any properties whose value is when casting an update. In other words, if this is set, Mongoose will delete
baz
from the update in before sending the update to the server.callback «Function»
Returns:
Example:
Valid options:
- same as in Model.updateOne