Browse Source

fixed AttributeKvRepository

pull/9850/head
dashevchenko 3 years ago
parent
commit
9619fb7fc5
  1. 4
      dao/src/main/java/org/thingsboard/server/dao/sql/attributes/AttributeKvRepository.java

4
dao/src/main/java/org/thingsboard/server/dao/sql/attributes/AttributeKvRepository.java

@ -43,12 +43,12 @@ public interface AttributeKvRepository extends JpaRepository<AttributeKvEntity,
@Param("attributeKey") int attributeKey);
@Query(value = "SELECT DISTINCT attribute_key FROM attribute_kv WHERE " +
"AND entity_id in (SELECT id FROM device WHERE tenant_id = :tenantId and device_profile_id = :deviceProfileId limit 100) ORDER BY attribute_key", nativeQuery = true)
"entity_id in (SELECT id FROM device WHERE tenant_id = :tenantId and device_profile_id = :deviceProfileId limit 100) ORDER BY attribute_key", nativeQuery = true)
List<Integer> findAllKeysByDeviceProfileId(@Param("tenantId") UUID tenantId,
@Param("deviceProfileId") UUID deviceProfileId);
@Query(value = "SELECT DISTINCT attribute_key FROM attribute_kv WHERE " +
"AND entity_id in (SELECT id FROM device WHERE tenant_id = :tenantId limit 100) ORDER BY attribute_key", nativeQuery = true)
"entity_id in (SELECT id FROM device WHERE tenant_id = :tenantId limit 100) ORDER BY attribute_key", nativeQuery = true)
List<Integer> findAllKeysByTenantId(@Param("tenantId") UUID tenantId);
@Query(value = "SELECT DISTINCT attribute_key FROM attribute_kv WHERE " +

Loading…
Cancel
Save