From 0d68322bb7ad348f223669000898a5e9edcb9898 Mon Sep 17 00:00:00 2001 From: Chatura Dilan Date: Mon, 15 May 2017 10:27:16 +0530 Subject: [PATCH] Fixing issues in db fileds --- .../mgt/core/dao/common/ApplicationManagementDAOUtil.java | 2 +- .../application/mgt/core/dao/impl/GenericAppManagementDAO.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/ApplicationManagementDAOUtil.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/ApplicationManagementDAOUtil.java index 11d9290cfe3..863549f7aca 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/ApplicationManagementDAOUtil.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/ApplicationManagementDAOUtil.java @@ -55,7 +55,7 @@ public class ApplicationManagementDAOUtil { Platform platform = new Platform(); platform.setName(rs.getString("APL_NAME")); - platform.setCode(rs.getString("APL_CODE")); + platform.setCode(rs.getString("APL_IDENTIFIER")); application.setPlatform(platform); Map properties = new HashMap<>(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/GenericAppManagementDAO.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/GenericAppManagementDAO.java index d68557a0268..65416d12ce5 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/GenericAppManagementDAO.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/GenericAppManagementDAO.java @@ -73,7 +73,8 @@ public class GenericAppManagementDAO implements ApplicationManagementDAO { conn = ConnectionManagerUtil.getCurrentConnection().get(); - sql += "SELECT SQL_CALC_FOUND_ROWS APP.*, APL.NAME AS APL_NAME, APL.CODE AS APL_CODE, CAT.NAME AS CAT_NAME "; + sql += "SELECT SQL_CALC_FOUND_ROWS APP.*, APL.NAME AS APL_NAME, APL.IDENTIFIER AS APL_IDENTIFIER," + + " CAT.NAME AS CAT_NAME "; sql += "FROM APPM_APPLICATION AS APP "; sql += "INNER JOIN APPM_PLATFORM_APPLICATION_MAPPING AS APM ON APP.PLATFORM_APPLICATION_MAPPING_ID = APM.ID "; sql += "INNER JOIN APPM_PLATFORM AS APL ON APM.PLATFORM_ID = APL.ID ";