code: function executeRelatedResultWithQuery (result, relatedName) {
      // get custom args for related model query
      var relatedArgs = this.args.with[relatedName]
      // get relation
      var relation = this.model.relation(relatedName)
      // build query args
      var queryArgs = {
          all: true,
          allow: this.args.allow,
          session: this.session,
          where: { relation: { name: this.model.name } },
      }
      // relation is via a linking table
      if (relation.via) {
          queryArgs.where.relation[relation.viaModelIdColumn] = result[relation.modelIdColumn] || result[model.defaultColumns[relation.modelIdColumn]]
      }
      // relation is direct
      else {
          queryArgs.where.relation[relation.relationIdColumn] = result[relation.modelIdColumn] || result[model.defaultColumns[relation.modelIdColumn]]
      }
      // merge args
      if (typeof relatedArgs === 'object') {
          _.merge(queryArgs, relatedArgs)
      }
      // do query on related model
      return relation.model.query(queryArgs)
      // merge related records once loaded
      .then(results => {
          result._related[relatedName] = results
      })
  }
docs: @function executeRelatedResultWithQuery
  
  perform query for related model
  
  @param {object} result
  @param {string}
  
  @returns {object}