diff --git a/docs/api-model.md b/docs/api-model.md index 3026d5db..15008a7d 100644 --- a/docs/api-model.md +++ b/docs/api-model.md @@ -310,10 +310,18 @@ User.find({ **Note:** See the specific connector's [docs](#connectors) for more info. -### Model.destroyAll(callback) +### Model.destroyAll([where], callback) Delete all Model instances from data source. **Note:** destroyAll method does not perform destroy hooks. +```js +Product.destroyAll({price: {gt: 99}}, function(err) { + // removed matching products +}); +``` + +> **NOTE:* `where` is optional and a where object... do NOT pass a filter object + ### Model.findById(id, callback) Find instance by id.