Fixes bug on Funder like criteria. (Issue #145)

This commit is contained in:
gkolokythas 2019-08-22 12:23:04 +03:00
parent 1f97eaf349
commit 230e7481b1
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public class FunderDaoImpl extends DatabaseAccess<Funder> implements FunderDao {
if (criteria.getLike() != null && !criteria.getLike().isEmpty()) if (criteria.getLike() != null && !criteria.getLike().isEmpty())
query.where((builder, root) -> query.where((builder, root) ->
builder.or(builder.like(builder.upper(root.get("label")), "%" + criteria.getLike().toUpperCase() + "%"), builder.or(builder.like(builder.upper(root.get("label")), "%" + criteria.getLike().toUpperCase() + "%"),
builder.or(builder.like(builder.upper(root.get("description")), "%" + criteria.getLike().toUpperCase() + "%")))); builder.or(builder.like(builder.upper(root.get("definition")), "%" + criteria.getLike().toUpperCase() + "%"))));
if (criteria.getReference() != null) if (criteria.getReference() != null)
query.where((builder, root) -> builder.equal(root.get("reference"), criteria.getReference())); query.where((builder, root) -> builder.equal(root.get("reference"), criteria.getReference()));
query.where((builder, root) -> builder.notEqual(root.get("status"), Funder.Status.DELETED.getValue())); query.where((builder, root) -> builder.notEqual(root.get("status"), Funder.Status.DELETED.getValue()));