Merge pull request #112 from strongloop/docs/destroyall
Fix destroyAll reference
This commit is contained in:
commit
029b012f98
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue