Fix on entity doi query

This commit is contained in:
Thomas Georgios Giannos 2023-12-06 18:08:15 +02:00
parent 8227f60cda
commit b9eba9edcb
1 changed files with 6 additions and 6 deletions

View File

@ -186,17 +186,17 @@ public class EntityDoiQuery extends QueryBase<EntityDoiEntity> {
predicates.add(notInClause.not()); predicates.add(notInClause.not());
} }
if (this.dois != null) { if (this.dois != null) {
CriteriaBuilder.In<String> notInClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(EntityDoiEntity._doi)); CriteriaBuilder.In<String> inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(EntityDoiEntity._doi));
for (String item : this.dois) for (String item : this.dois)
notInClause.value(item); inClause.value(item);
predicates.add(notInClause.not()); predicates.add(inClause);
} }
if (this.entityIds != null) { if (this.entityIds != null) {
CriteriaBuilder.In<UUID> noInClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(EntityDoiEntity._entityId)); CriteriaBuilder.In<UUID> inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(EntityDoiEntity._entityId));
for (UUID item: this.entityIds) { for (UUID item: this.entityIds) {
noInClause.value(item); inClause.value(item);
predicates.add(noInClause.not()); predicates.add(inClause);
} }
} }
if (!predicates.isEmpty()) { if (!predicates.isEmpty()) {