Add alias to destroy/destroyAll

This commit is contained in:
Raymond Feng 2013-06-25 21:08:34 -07:00
parent 0ae61d3b53
commit 64da1d441a
1 changed files with 2 additions and 0 deletions

View File

@ -421,6 +421,7 @@ DataAccessObject.findOne.returns = {arg: 'data', type: 'object'};
* Destroy all records
* @param {Function} cb - callback called with (err)
*/
DataAccessObject.deleteAll =
DataAccessObject.destroyAll = function destroyAll(cb) {
if (stillConnecting(this.schema, this, arguments)) return;
@ -551,6 +552,7 @@ DataAccessObject.prototype._adapter = function () {
*
* @triggers `destroy` hook (async) before and after destroying object
*/
DataAccessObject.prototype.delete =
DataAccessObject.prototype.destroy = function (cb) {
if (stillConnecting(this.constructor.schema, this, arguments)) return;