From 20e28e07e411d43398242cd8c1f2dba591daa73f Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Fri, 20 Dec 2013 13:37:18 -0800 Subject: [PATCH] Fix destroyAll reference --- docs/api-model.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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.