lib/plugins/query.js
function (id, options) {
            var self = this;
            return this._checkTransaction(options, function () {
                return self.findById(id).chain(function (model) {
                    return model ? model.remove(options) : null;
                });
            });
        }
function (id, options) {
            var self = this;
            return this._checkTransaction(options, function () {
                return self.findById(id).chain(function (model) {
                    return model ? model.remove(options) : null;
                });
            });
        }
function ( id , options ) { var self = this ; return this . _checkTransaction ( options , function ( ) { return self . findById ( id ) . chain ( function ( model ) { return model ? model . remove ( options ) : null ; } ) ; } ) ; }
Similar to remove but takes an id or an array for a composite key.

@example

User.removeById(1);

@param id id or an array for a composite key, to find the model by
@param {Object} [options] additional options.
@param {Boolean} [options.transaction] boolean indicating if a transaction should be used when
removing the model.

@return {comb.Promise} called back when the removal completes.
Similar to remove but takes an id or an array for a composite key .