Merge pull request #112 from strongloop/docs/destroyall

Fix destroyAll reference
This commit is contained in:
Ritchie Martori 2013-12-20 15:03:57 -08:00
commit 029b012f98
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.