Add alias to destroy/destroyAll
This commit is contained in:
parent
0ae61d3b53
commit
64da1d441a
|
@ -421,6 +421,7 @@ DataAccessObject.findOne.returns = {arg: 'data', type: 'object'};
|
||||||
* Destroy all records
|
* Destroy all records
|
||||||
* @param {Function} cb - callback called with (err)
|
* @param {Function} cb - callback called with (err)
|
||||||
*/
|
*/
|
||||||
|
DataAccessObject.deleteAll =
|
||||||
DataAccessObject.destroyAll = function destroyAll(cb) {
|
DataAccessObject.destroyAll = function destroyAll(cb) {
|
||||||
if (stillConnecting(this.schema, this, arguments)) return;
|
if (stillConnecting(this.schema, this, arguments)) return;
|
||||||
|
|
||||||
|
@ -551,6 +552,7 @@ DataAccessObject.prototype._adapter = function () {
|
||||||
*
|
*
|
||||||
* @triggers `destroy` hook (async) before and after destroying object
|
* @triggers `destroy` hook (async) before and after destroying object
|
||||||
*/
|
*/
|
||||||
|
DataAccessObject.prototype.delete =
|
||||||
DataAccessObject.prototype.destroy = function (cb) {
|
DataAccessObject.prototype.destroy = function (cb) {
|
||||||
if (stillConnecting(this.constructor.schema, this, arguments)) return;
|
if (stillConnecting(this.constructor.schema, this, arguments)) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue