Fix query For Reasearcher dao Impl
This commit is contained in:
parent
c9c4de0dc9
commit
44dcc77bec
|
@ -24,9 +24,9 @@ public class ResearcherDaoImpl extends DatabaseAccess<Researcher> implements Res
|
|||
public QueryableList<Researcher> getWithCriteria(ResearcherCriteria criteria) {
|
||||
QueryableList<Researcher> query = asQueryable();
|
||||
if (criteria.getLike() != null && !criteria.getLike().isEmpty())
|
||||
query.where((builder, root) ->builder.or(builder.like(builder.upper(root.get("reference")), "%" + criteria.getLike().toUpperCase() + "%")));
|
||||
query.where((builder, root) ->builder.or(builder.like(root.get("reference"), "%" + criteria.getLike().toUpperCase() + "%")));
|
||||
if (criteria.getName() != null && !criteria.getName().isEmpty())
|
||||
query.where((builder, root) ->builder.or(builder.like(builder.upper(root.get("label")), "%" + criteria.getName().toUpperCase() + "%")));
|
||||
query.where((builder, root) ->builder.or(builder.like(root.get("label"), "%" + criteria.getName().toUpperCase() + "%")));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue