diff --git a/docs/reference/models.md b/docs/reference/models.md index fbbc20a4..930a3d33 100644 --- a/docs/reference/models.md +++ b/docs/reference/models.md @@ -490,7 +490,7 @@ Use the `all` method to find lots of items. Pass it a set of query parameters in - `query [object]`: if the query is an object, it will be interpreted as a Query object ##### options -- `sort [object]`: each key is a property name, each value can either be `asc` or `desc`. +- `sort [object]`: each key is a property name, each value can either be `asc` or `desc`. - `includes [array]`: Using SQL adapters, you may supply an array of model association names to eager-load. ##### example @@ -527,6 +527,20 @@ User.remove('abc-123', function (err, data) { }); ``` +`remove(condition, fn)` + +Remove instances from the database by condition + +##### condition +- `condition [object]`: the key value condition of instances to be removed + +##### examples +``` +User.remove({state: "inactive"}, function (err, data) { + // do something now that it's removed. +}); +``` + * * * #### queries