code: function removeWhereFromQuery(req, method, config, conn, cb){
    var query = {};
    if(_.isObject(conn.options) && conn.options.hasOwnProperty('where')){
      query = conn.options.where;
      delete conn.options.where;
      conn.options = _.merge(conn.options, query);
    }
    cb();
  }
docs: Cleans query options object from Waterline-specific `where` object, by moving `where` values to main query options object.
  For example, given the query options object `{where:{firstName: "Tedd"}, limit: 1}, this function will modify the query options
  object to {firstName: "Tedd", limit: 1}
  
  @param {Request} req - SuperAgent HTTP Request object
  @param {String}  method - HTTP request method
  @param {Object}  config - configuration object used to hold request-specific configuration. this is used to avoid polluting the connection's own configuration object.
  @param {Object}  conn - connection configuration object:
  - {Object} connection - Waterline connection configuration object
  - {String} collection - collection name. appended to API pathname.
  For example, given the api `http://localhost:8080/api/v1`,
  a collection named `user` will resolve to `http://localhost:8080/api/v1/user`.
  - {Object} options - query options object. contains query conditions (`where`), sort, limit etc. as per Waterline's API.
  - {Array<Object>} values - values of records to create.
  @param {Function} cb - function that is called when this hook finishes