Fix destroyAll reference

This commit is contained in:
Ritchie Martori 2013-12-20 13:37:18 -08:00
parent a47317de0d
commit 20e28e07e4
1 changed files with 9 additions and 1 deletions

View File

@ -310,10 +310,18 @@ User.find({
**Note:** See the specific connector's [docs](#connectors) for more info. **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. 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) ### Model.findById(id, callback)
Find instance by id. Find instance by id.