@Override public Map<String, FilterExpression> parseTypedExpression(String path, MultivaluedMap<String, String> filterParams) throws ParseException { Map<String, FilterExpression> expressionMap = new HashMap<>(); List<FilterPredicate> filterPredicates = extractPredicates(filterParams); for (FilterPredicate filterPredicate : filterPredicates) { if (FilterPredicate.toManyInPath(dictionary, filterPredicate.getPath())) { throw new ParseException("Invalid toMany join: " + filterPredicate); } String entityType = dictionary.getJsonAliasFor(filterPredicate.getEntityType()); FilterExpression filterExpression = expressionMap.get(entityType); if (filterExpression != null) { expressionMap.put(entityType, new AndFilterExpression(filterExpression, filterPredicate)); } else { expressionMap.put(entityType, filterPredicate); } } return expressionMap; }
@Override public Map<String, FilterExpression> parseTypedExpression(String path, MultivaluedMap<String, String> filterParams) throws ParseException { Map<String, FilterExpression> expressionMap = new HashMap<>(); List<FilterPredicate> filterPredicates = extractPredicates(filterParams); for (FilterPredicate filterPredicate : filterPredicates) { if (FilterPredicate.toManyInPath(dictionary, filterPredicate.getPath())) { throw new ParseException("Invalid toMany join: " + filterPredicate); } String entityType = dictionary.getJsonAliasFor(filterPredicate.getEntityType()); FilterExpression filterExpression = expressionMap.get(entityType); if (filterExpression != null) { expressionMap.put(entityType, new AndFilterExpression(filterExpression, filterPredicate)); } else { expressionMap.put(entityType, filterPredicate); } } return expressionMap; }
Path path = buildPath(entityType, relationship); if (FilterPredicate.toManyInPath(dictionary, path) && !allowNestedToManyAssociations) { throw new RSQLParseException(String.format("Invalid association %s", relationship));
Path path = buildPath(entityType, relationship); if (FilterPredicate.toManyInPath(dictionary, path) && !allowNestedToManyAssociations) { throw new RSQLParseException(String.format("Invalid association %s", relationship));