This is what worked for me for the OR condition, which is also with the IN condition, and not with the answer that received the most votes in this discussion:
criteria.add( Restrictions.or( Restrictions.eq(ch.getPath(ch.propertyResolver().getXXXX()), "OR_STRING"), Restrictions.in(ch.getPath(ch.propertyResolver().getYYYY()), new String[]{"AA","BB","CC"}) ));
Result Query:
and ( this_.XXXX=? or this_.YYYY in ( ?, ?, ? ) )
ONS Jun 21 '19 at 6:46 2019-06-21 06:46
source share