code: function(options, resolve, reject) {
      const Store = require('../../store')
  
      var self = this
      var query = this.definition.query(options)
      var primaryKeys = this.definition.primaryKeys
      var condition = {}
  
      if (typeof options === 'function') {
        reject = resolve
        resolve = options
        options = null
      }
  
      if (resolve) throw new Error('then')
  
      options = options || {}
  
      for (var i = 0; i < primaryKeys.length; i++) {
        condition[primaryKeys[i]] = self[primaryKeys[i]]
      }
  
      return query
        .where(condition)
        .delete(options)
        .catch(function(error) {
          debug(query.toString())
          throw new Store.SQLError(error)
        })
        .then(function() {
          debug(query.toString())
        })
        .then(resolve, reject)
    }
docs: Deletes the record. beforeDestroy and afterDestroy want be called!
  Be careful with relations: The `dependent` option is not honored
  
  @class Record
  @method delete
  @param {function} callback - The delete callback
  
  @callback
  @param {boolean} result - will be true if the delete was successful
  @this Record
  
  @return {Record}