# scheme.statics.createOrUpdate(query, update, options)
Creates or updates an existing document in a Mongoose model.
Parameters
Name | Types | Description |
---|---|---|
query | Object |
Query object. |
update | Object |
Updated object. See http://mongoosejs.com/docs/api.html#model_Model.update for more information. |
options | Object |
Options object. See http://mongoosejs.com/docs/api.html#model_Model.update for more information. |
Returns
Object
Promise