if (!_.isUndefined(criteria.max)) {
    throw new Error(
      'The `max` clause is no longer supported in Sails/Waterline.\n'+
      'In previous versions, `max` could be provided in a criteria '+
      'to perform an aggregation query.  But as of Sails v1.0/Waterline v0.13, the '+