Add missing apply filter

This commit is contained in:
George Kalampokis 2023-11-06 17:22:36 +02:00
parent e42bdcfc0a
commit 5ceed08b9c
1 changed files with 8 additions and 0 deletions

View File

@ -189,6 +189,14 @@ public class EntityDoiQuery extends QueryBase<EntityDoiEntity> {
notInClause.value(item); notInClause.value(item);
predicates.add(notInClause.not()); predicates.add(notInClause.not());
} }
if (this.entityIds != null) {
CriteriaBuilder.In<UUID> noInClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(EntityDoiEntity._entityId));
for (UUID item: this.entityIds) {
noInClause.value(item);
predicates.add(noInClause.not());
}
}
if (!predicates.isEmpty()) { if (!predicates.isEmpty()) {
Predicate[] predicatesArray = predicates.toArray(new Predicate[0]); Predicate[] predicatesArray = predicates.toArray(new Predicate[0]);
return queryContext.CriteriaBuilder.and(predicatesArray); return queryContext.CriteriaBuilder.and(predicatesArray);