diff --git a/spi-impl/series/series-dao/src/main/java/org/n52/series/db/da/HierarchicalParameterRepository.java b/spi-impl/series/series-dao/src/main/java/org/n52/series/db/da/HierarchicalParameterRepository.java index d402e0a2e..16cba59d3 100644 --- a/spi-impl/series/series-dao/src/main/java/org/n52/series/db/da/HierarchicalParameterRepository.java +++ b/spi-impl/series/series-dao/src/main/java/org/n52/series/db/da/HierarchicalParameterRepository.java @@ -14,7 +14,7 @@ public abstract class HierarchicalParameterRepository, O> extends SessionAwareRepository implements OutputAssembler { // TODO introduce lambdas here - + protected List createExpanded(Collection entities, DbQuery parameters) throws DataAccessException { Set results = new HashSet<>(); if (entities != null) { diff --git a/spi-impl/series/series-dao/src/main/java/org/n52/series/db/dao/DbQuery.java b/spi-impl/series/series-dao/src/main/java/org/n52/series/db/dao/DbQuery.java index ba8c5cd74..6b4d53679 100644 --- a/spi-impl/series/series-dao/src/main/java/org/n52/series/db/dao/DbQuery.java +++ b/spi-impl/series/series-dao/src/main/java/org/n52/series/db/dao/DbQuery.java @@ -329,7 +329,10 @@ private Type getGeometryType(String geometryType) { public Criteria addDetachedFilters(String propertyName, Criteria criteria) { DetachedCriteria filter = DetachedCriteria.forClass(DatasetEntity.class) - .setProjection(projectionList().add(property(propertyName))); + .setProjection(projectionList() + .add(Property.forName(propertyName != null && !propertyName.isEmpty() + ? propertyName + : "pkid"))); filterWithSingularParmameters(filter); // stay backwards compatible addFilterRestriction(parameters.getPhenomena(), "phenomenon", filter);