From 6acffde25ca2e3e7de82fdc6f85da3515ddf3a97 Mon Sep 17 00:00:00 2001 From: Benfattoum Date: Mon, 3 Jun 2024 12:00:14 +0200 Subject: [PATCH] fixing getType SQL query adding as in queryDAO --- .../neclab/ngsildbroker/queryhandler/repository/QueryDAO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));