code: function(options, callback) {
      // var self = this
  
      if (typeof options === 'function') {
        callback = options
        options = {}
      }
  
      if (options.transaction) {
        return callback(options.transaction)
      } else {
        return this.connection
          .transaction(function(transaction) {
            options.transaction = transaction
            return callback(transaction)
          })
          .then(function(result) {
            debug('commit')
            return result
          })
          .catch(function(e) {
            // TODO: do something with e.g. 'afterSave' rollback message!?!
            debug('rollback')
            throw e
          })
      }
    }
docs: TODO:... write documentation
  
  @class Record
  @method transaction
  @param {object} transaction - The transaction object