diff --git a/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java index eb10c4d8bd1..c814392ae0b 100644 --- a/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java +++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java @@ -1266,7 +1266,7 @@ public class GenericSubscriptionDAOImpl extends AbstractDAOImpl implements Subsc Connection conn = this.getDBConnection(); List subscribedGroups = new ArrayList<>(); String sql = "SELECT " - + "GS.GROUP_NAME AS GROUPS " + + "GS.GROUP_NAME AS APP_GROUPS " + "FROM AP_GROUP_SUBSCRIPTION GS " + "WHERE " + "AP_APP_RELEASE_ID = ? AND TENANT_ID = ? LIMIT ? OFFSET ?"; @@ -1277,7 +1277,7 @@ public class GenericSubscriptionDAOImpl extends AbstractDAOImpl implements Subsc ps.setInt(4, offsetValue); try (ResultSet rs = ps.executeQuery()) { while (rs.next()) { - subscribedGroups.add(rs.getString("GROUPS")); + subscribedGroups.add(rs.getString("APP_GROUPS")); } } return subscribedGroups; @@ -1306,7 +1306,7 @@ public class GenericSubscriptionDAOImpl extends AbstractDAOImpl implements Subsc try { Connection conn = this.getDBConnection(); String sql = "SELECT " - + "COUNT(GS.GROUP_NAME) AS GROUPS " + + "COUNT(GS.GROUP_NAME) AS APP_GROUPS_COUNT " + "FROM AP_GROUP_SUBSCRIPTION GS " + "WHERE " + "AP_APP_RELEASE_ID = ? AND TENANT_ID = ?"; @@ -1316,7 +1316,7 @@ public class GenericSubscriptionDAOImpl extends AbstractDAOImpl implements Subsc try (ResultSet rs = stmt.executeQuery()) { if (rs.next()) { - return rs.getInt("GROUPS"); + return rs.getInt("APP_GROUPS_COUNT"); } } return 0;