LearnBoost/mongoose — Issue #751: Update method in documentation doesn't fire setters
Author: awnist
Created: 2012-02-27 20:39:06+00:00
State: open

From the documentation:

Model.update(conditions, update, options, callback);

doesn't seem to fire any setters. The only way I could get the setters to work on updates was the build a query and do something like this:

documents.forEach (doc) ->
# merge this document with update data
extend(doc, update_data)
doc.save()

If this is expected behavior, it should be explained in the docs.