AbstractQueryCreator methods should be nullable and handle nulls
Closed this issue · 0 comments
SledgeHammer01 commented
In this method here:
Shouldn't the create() method used here (as well as the and() or or() methods) allow and consider null returns?
Consider the case in a custom query creator where I am processing keywords, but for a specific keyword, based on some logic, I DO NOT want to add a predicate. So, from PredicateBuilder::build(), I would want to return null (which works if I don't have any additional predicates), but if I did, that would blow up on the and() and or() calls.
The only thing I can do now is use CriteriaBuilder::conjunction() but that adds a where 1=1 clause.