I\'m trying to do a basic \"OR\" on three fields using a hibernate criteria query.
Example
class Whatever{
string name;
string address;
string pho
If someone is using CriteriaQuery instead of Criteria, you can put all your expressions in a Predicate list and put a OR by predicates size like this:
List predicates = new ArrayList<>();
if (...) {
predicates.add(...);
}
criteriaQuery.where(cb.or(predicates.toArray(new Predicate[predicates.size()])));