Commit 7ef75524d045341f2034b799cae30e235537ab63
Merge branch 'master' of github.com:thingsboard/thingsboard
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -200,7 +200,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { | @@ -200,7 +200,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { | ||
200 | " THEN (select additional_info from device where id = entity_id)" + | 200 | " THEN (select additional_info from device where id = entity_id)" + |
201 | " WHEN entity.entity_type = 'ENTITY_VIEW'" + | 201 | " WHEN entity.entity_type = 'ENTITY_VIEW'" + |
202 | " THEN (select additional_info from entity_view where id = entity_id)" + | 202 | " THEN (select additional_info from entity_view where id = entity_id)" + |
203 | - " END as label"; | 203 | + " END as additional_info"; |
204 | 204 | ||
205 | static { | 205 | static { |
206 | entityTableMap.put(EntityType.ASSET, "asset"); | 206 | entityTableMap.put(EntityType.ASSET, "asset"); |
@@ -460,7 +460,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { | @@ -460,7 +460,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { | ||
460 | //TODO: fetch last level only. | 460 | //TODO: fetch last level only. |
461 | //TODO: fetch distinct records. | 461 | //TODO: fetch distinct records. |
462 | String lvlFilter = getLvlFilter(entityFilter.getMaxLevel()); | 462 | String lvlFilter = getLvlFilter(entityFilter.getMaxLevel()); |
463 | - String selectFields = "SELECT tenant_id, customer_id, id, created_time, type, name " | 463 | + String selectFields = "SELECT tenant_id, customer_id, id, created_time, type, name, additional_info " |
464 | + (entityType.equals(EntityType.ENTITY_VIEW) ? "" : ", label ") | 464 | + (entityType.equals(EntityType.ENTITY_VIEW) ? "" : ", label ") |
465 | + "FROM " + entityType.name() + " WHERE id in ( SELECT entity_id"; | 465 | + "FROM " + entityType.name() + " WHERE id in ( SELECT entity_id"; |
466 | String from = getQueryTemplate(entityFilter.getDirection()); | 466 | String from = getQueryTemplate(entityFilter.getDirection()); |