From cb1a73fbc141aff0d2c8a9000387d502599386d9 Mon Sep 17 00:00:00 2001 From: Josephat Mwakyusa Date: Wed, 31 Jul 2024 10:19:04 +0300 Subject: [PATCH] Change reference keys on aggregate data summation query --- .../com/Adapter/icare/Repository/DatastoreRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/com/Adapter/icare/Repository/DatastoreRepository.java b/backend/src/main/java/com/Adapter/icare/Repository/DatastoreRepository.java index 2311d1c6..3d8919f2 100644 --- a/backend/src/main/java/com/Adapter/icare/Repository/DatastoreRepository.java +++ b/backend/src/main/java/com/Adapter/icare/Repository/DatastoreRepository.java @@ -87,8 +87,8 @@ public interface DatastoreRepository extends JpaRepository { "FROM datastore," + "JSON_TABLE(datastore.value, '$.data[*]'" + " COLUMNS (" + - " de VARCHAR(255) PATH '$.de'," + - " co VARCHAR(255) PATH '$.co'," + + " de VARCHAR(255) PATH '$.dataElement'," + + " co VARCHAR(255) PATH '$.categoryOptionCombo'," + " dataValue INT PATH '$.value'" + " )" + ") AS jsonTable" +