docs: function initModelUnlink (args) {
      var controller = this
      var model = this.model
      // if model does not have id column then cannot use default controller
      if (!defined(model.columnName('id'))) {
          return
      }
      // set true if model has ny relations that link via another model
      var hasVia = false
      // check for relations
      _.each(model.relations, relation => {
          if (defined(relation.via)) {
              hasVia = true
          }
      })
      // if model does not have via then do not create link endpoing
      if (!hasVia) {
          return
      }
      // get accountId column
      var accountIdColumn = model.columnName('accountId') 
      // set role to authenticated if model requires account id
      var role = defined(args.defaultRole) 
          ? args.defaultRole
          : defined(accountIdColumn) && model.columns[accountIdColumn].null === false
              ? 'authenticated'
              : 'all'
      // index inputs
      var input = {
          // get current revision of record
          current: ['query.current', 'body.current'],
          // get record even if deleted
          deleted: ['query.deleted', 'body.deleted'],
          // ignore conflicts
          force: ['query.force', 'body.force'],
          // record id
          id: 'params.id',
          // url to redirect to when done
          redirect: ['query.redirect', 'body.redirect'],
          // http referrer
          referrer: 'headers.referer',
          // name of model to link to
          relation: ['query.relation', 'body.relation'],
          // id of model to link to
          relationId: ['query.relationId', 'body.relationId'],
      }
      // create path if it does not exist
      if (!this.paths['/:id/unlink']) {
          this.paths['/:id/unlink'] = {}
      }
      // add handler for POST /:id/link to link record to another
      this.paths['/:id/unlink'].post = this.paths['/:id/unlink'].get = [
          {
              before: function (args) {
                  // load primary record and related record
                  return loadRecordAndRelation(controller, args)
              },
              input: input,
              method: function (args) {
                  // unlink related record from primary record
                  return unlinkModel(controller, args)
              },
              methodName: 'unlink',
              role: role,
          },
      ]
  }