Fixes bug on Grant's query with criteria.

This commit is contained in:
gkolokythas 2019-08-26 17:56:16 +03:00
parent 93cb23b870
commit 1bd789b924
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ public class GrantDaoImpl extends DatabaseAccess<Grant> implements GrantDao {
query.where((builder, root) -> builder.equal(root.join("dmps").get("status"), DMP.DMPStatus.FINALISED.getValue())).distinct();
}
if (criteria.getFunderId() != null && !criteria.getFunderId().trim().isEmpty())
query.where((builder, root) -> builder.equal(root.get("funder"), criteria.getFunderId()));
query.where((builder, root) -> builder.equal(root.get("funder").get("id"), UUID.fromString(criteria.getFunderId())));
query.where((builder, root) -> builder.notEqual(root.get("status"), Grant.Status.DELETED.getValue()));
return query;
}