QuerydslPredicateBuilder.getPredicate() was refactored 2 or 3 commits ago, changing the logic in a way that now when incoming params multimap is empty, a new empty BooleanBuilder() instance is returned.
But when params multimap comes populated and it is iterated without any successful binding , instead of returning the coherent empty BooleanBuilder() instance, its getValue(), which equals null, is returned instead.
This means that behavior is inconsistent for when no relevant associations are found, the result is different depending on whether the multimap is empty or contanis footobeignored.
This effectively affects current version of spring-data-rest's QuerydslAwareRootResourceInformationHandlerMethodArgumentResolver, since it was also refactored to instantiate QuerydslRepositoryInvokerAdapter only on the event of non null preficates, otherwise it returns the default invoker which is the UnwrappingRepository one that ignores querydsl predicates.
This means that current released library resolves a QueryDsl aware invoker only if you don't provide pagination or other kinds of params
Marc opened DATACMNS-1559 and commented
QuerydslPredicateBuilder.getPredicate() was refactored 2 or 3 commits ago, changing the logic in a way that now when incoming params multimap is empty, a new empty BooleanBuilder() instance is returned.
But when params multimap comes populated and it is iterated without any successful binding , instead of returning the coherent empty BooleanBuilder() instance, its getValue(), which equals null, is returned instead.
This means that behavior is inconsistent for when no relevant associations are found, the result is different depending on whether the multimap is empty or contanis footobeignored.
This effectively affects current version of spring-data-rest's QuerydslAwareRootResourceInformationHandlerMethodArgumentResolver, since it was also refactored to instantiate QuerydslRepositoryInvokerAdapter only on the event of non null preficates, otherwise it returns the default invoker which is the UnwrappingRepository one that ignores querydsl predicates.
This means that current released library resolves a QueryDsl aware invoker only if you don't provide pagination or other kinds of params
Affects: 2.1.9 (Lovelace SR9)
Reference URL: https://github.com/spring-projects/spring-data-commons/blob/master/src/main/java/org/springframework/data/querydsl/binding/QuerydslPredicateBuilder.java
1 votes, 3 watchers