diff --git a/src/main/java/dev/struchkov/haiti/filter/jooq/CriteriaJooqQuery.java b/src/main/java/dev/struchkov/haiti/filter/jooq/CriteriaJooqQuery.java index 2c34081..ada4e4b 100644 --- a/src/main/java/dev/struchkov/haiti/filter/jooq/CriteriaJooqQuery.java +++ b/src/main/java/dev/struchkov/haiti/filter/jooq/CriteriaJooqQuery.java @@ -45,8 +45,12 @@ public class CriteriaJooqQuery { public CriteriaJooqQuery matchPhrase(String field, Set values) { Assert.isNotNull(field); - if (values != null && !values.isEmpty()) { - conditions.add(DSL.field(field).in(values)); + if (values != null) { + if (values.isEmpty()) { + conditions.add(DSL.field(field).isNull()); + } else { + conditions.add(DSL.field(field).in(values)); + } } return this; }