code: function orderResults (results) {
      // get id column names
      var idColumn = this.model.defaultColumnsInverse.id
      // require id column for model
      if (!defined(idColumn)) {
          return results
      }
      // get id column name that was used for query
      var queryIdColumn = defined(this.args.where.id)
          ? 'id'
          : defined(this.args.where[idColumn])
              ? idColumn
              : undefined
      // if query was not on id column then do not reorder
      if (!defined(queryIdColumn)) {
          return results
      }
      // list of ids as querired
      var queryIds
      // if id property is array then get ids
      if (Array.isArray(this.args.where[queryIdColumn])) {
          queryIds = this.args.where[queryIdColumn]
      }
      // if id has an in query with array then get ids
      else if (typeof this.args.where[queryIdColumn] === 'object' && Array.isArray(this.args.where[queryIdColumn].in)) {
          queryIds = this.args.where[queryIdColumn].in
      }
      // if query is not by list of ids then do not reorder
      if (!defined(queryIds)) {
          return results
      }
      // group results by id - if current record was queried then must use
      // the id that column was selected by instead of record id
      var resultsById = _.keyBy(results, this.args.current ? idColumn+'Select' : idColumn)
      // ordered result set
      var orderedRes = []
      // iterate over queried ids and add to ordered result set
      _.each(queryIds, queryId => {
          if (defined(resultsById[queryId])) {
              orderedRes.push(resultsById[queryId])
          }
      })
  
      return orderedRes
  }
docs: @function orderReults
  
  if query was for a list of ids then order results in the same order that
  the ids were queried
  
  @param {array} res
  
  @returns {array}