From 7218a7e697576ec5e62363f3ac929b8b6a770904 Mon Sep 17 00:00:00 2001 From: hilpitome Date: Thu, 26 Oct 2023 19:31:04 +0300 Subject: [PATCH 1/2] optimize generate unique id --- .../org/opensrp/repository/postgres/UniqueIdRepositoryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opensrp/repository/postgres/UniqueIdRepositoryImpl.java b/src/main/java/org/opensrp/repository/postgres/UniqueIdRepositoryImpl.java index 4d531106e..a6cf83cb1 100644 --- a/src/main/java/org/opensrp/repository/postgres/UniqueIdRepositoryImpl.java +++ b/src/main/java/org/opensrp/repository/postgres/UniqueIdRepositoryImpl.java @@ -87,7 +87,7 @@ public UniqueId findByIdentifierSourceOrderByIdDesc(Long idSource) { example.createCriteria().andIdSourceEqualTo(idSource); example.setOrderByClause("id DESC"); - List uniqueIds = uniqueIdMapper.selectByExample(example); + List uniqueIds = uniqueIdMapper.selectMany(example, 0, 1); List convertedUniqueIds = convert(uniqueIds); return convertedUniqueIds != null && convertedUniqueIds.size() >= 1 ? convertedUniqueIds.get(0) : null; } From 736b9521c7f09143a0c608736e67c0777eebb8d8 Mon Sep 17 00:00:00 2001 From: hilpitome Date: Thu, 26 Oct 2023 19:32:29 +0300 Subject: [PATCH 2/2] bump up version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a6fc02ebc..d6d6bab4f 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ opensrp-server-core jar - 2.14.7-SNAPSHOT + 2.14.8-SNAPSHOT opensrp-server-core OpenSRP Server Core module https://github.com/OpenSRP/opensrp-server-core