From f20e503f79dcd729143b00b15c9e7aa9e29bca63 Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Khan Date: Fri, 17 Feb 2023 11:27:29 +0500 Subject: [PATCH 1/2] Update query to avoid exception --- .../custom/xml/CustomLocationMetadataMapper.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomLocationMetadataMapper.xml b/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomLocationMetadataMapper.xml index 5f99cd8f9..5ac0b7f66 100755 --- a/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomLocationMetadataMapper.xml +++ b/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomLocationMetadataMapper.xml @@ -214,11 +214,14 @@ WITH RECURSIVE locations AS ( SELECT lm1.geojson_id, lm1.parent_id, lm1.location_id, 0 as level - FROM core.location_metadata lm1 WHERE geojson_id IN - - #{value} - - AND lm1.status IN ('ACTIVE', 'PENDING_REVIEW') + FROM core.location_metadata lm1 + WHERE lm1.status IN ('ACTIVE', 'PENDING_REVIEW') + + AND geojson_id IN + + #{value} + + UNION SELECT lm2.geojson_id, lm2.parent_id, lm2.location_id,level+1 as level FROM locations lm1 From 71e3cd6b0c21698fe8e9a905609d3755be6b1ca6 Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Khan Date: Fri, 17 Feb 2023 11:31:26 +0500 Subject: [PATCH 2/2] Bump up core version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bee8b5ed8..e2c1382f1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ opensrp-server-core jar - 3.2.8-SNAPSHOT + 3.2.9-SNAPSHOT opensrp-server-core OpenSRP Server Core module https://github.com/OpenSRP/opensrp-server-core