From 79e0c2d1ebceb06e4fef548c2456d686130a4c5b Mon Sep 17 00:00:00 2001 From: "osh.silva" Date: Thu, 27 Jun 2024 16:48:02 +0530 Subject: [PATCH] Add fix for multiple device app activity details retrieval --- .../core/dao/impl/subscription/GenericSubscriptionDAOImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java index 79e7b76660..fbdf896d68 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java @@ -1451,7 +1451,8 @@ public class GenericSubscriptionDAOImpl extends AbstractDAOImpl implements Subsc + "JOIN AP_DEVICE_SUBSCRIPTION DS ON SOP.AP_DEVICE_SUBSCRIPTION_ID = DS.ID " + "JOIN AP_APP_RELEASE AR ON DS.AP_APP_RELEASE_ID = AR.ID " + "JOIN AP_APP AP ON AP.ID = AR.AP_APP_ID " - + " WHERE SOP.OPERATION_ID = ? AND SOP.TENANT_ID = ?"; + + "WHERE SOP.OPERATION_ID = ? AND SOP.TENANT_ID = ? " + + "LIMIT 1"; Connection conn = this.getDBConnection(); try (PreparedStatement stmt = conn.prepareStatement(sql)) {