HHH-7800: Fixed "between" doesn't work inside a disjunction issue
This commit is contained in:
parent
54760bb61e
commit
ff25434d1f
|
@ -44,7 +44,9 @@ public class BetweenAuditExpression implements AuditCriterion {
|
|||
public void addToQuery(AuditConfiguration auditCfg, String entityName, QueryBuilder qb, Parameters parameters) {
|
||||
String propertyName = propertyNameGetter.get(auditCfg);
|
||||
CriteriaTools.checkPropertyNotARelation(auditCfg, entityName, propertyName);
|
||||
parameters.addWhereWithParam(propertyName, ">=", lo);
|
||||
parameters.addWhereWithParam(propertyName, "<=", hi);
|
||||
|
||||
Parameters subParams = parameters.addSubParameters(Parameters.AND);
|
||||
subParams.addWhereWithParam(propertyName, ">=", lo);
|
||||
subParams.addWhereWithParam(propertyName, "<=", hi);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue