diff --git a/QueryManager/src/main/java/eu/neclab/ngsildbroker/queryhandler/repository/QueryDAO.java b/QueryManager/src/main/java/eu/neclab/ngsildbroker/queryhandler/repository/QueryDAO.java index 3f07c6e09..cae710088 100644 --- a/QueryManager/src/main/java/eu/neclab/ngsildbroker/queryhandler/repository/QueryDAO.java +++ b/QueryManager/src/main/java/eu/neclab/ngsildbroker/queryhandler/repository/QueryDAO.java @@ -220,7 +220,7 @@ public Uni> queryLocalOnly(String tenantId, String[] ids, TypeQueryT public Uni> getTypes(String tenantId) { return clientManager.getClient(tenantId, false).onItem().transformToUni(client -> { return client - .preparedQuery("SELECT DISTINCT myTypes from (SELECT to_jsonb(unnest(e_types)) as myTypes from entity UNION ALL SELECT to_jsonb(e_type) as myTypes from csourceinformation);") + .preparedQuery("SELECT DISTINCT myTypes from (SELECT to_jsonb(unnest(e_types)) as myTypes from entity UNION ALL SELECT to_jsonb(e_type) as myTypes from csourceinformation) as NA;") .execute().onItem().transform(rows -> { Map result = Maps.newHashMap(); result.put(NGSIConstants.JSON_LD_TYPE, Lists.newArrayList(NGSIConstants.NGSI_LD_ENTITY_LIST));