Fixes bug on Dataset Criteria.

This commit is contained in:
gkolokythas 2019-05-10 16:05:01 +03:00
parent 4829151355
commit f3fbf012f9
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ public class DatasetDaoImpl extends DatabaseAccess<Dataset> implements DatasetDa
if (criteria.getOrganisations() != null && !criteria.getOrganisations().isEmpty()) {
query.where((builder, root) -> root.join("dmp").join("organisations").get("reference").in(criteria.getOrganisations()));
}
if (criteria.getProjects() != null) {
if (criteria.getProjects() != null && !criteria.getProjects().isEmpty()) {
query.where((builder, root) -> root.join("dmp").join("project").get("id").in(criteria.getProjects()));
}
query.where(((builder, root) -> builder.notEqual(root.get("status"), Dataset.Status.DELETED.getValue())));