From 74e4b2ca5da3f618554b98090a7695e32bc3aa6a Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Thu, 4 Apr 2019 09:07:28 +0530 Subject: [PATCH] Fix app adding issue --- .../dao/impl/application/GenericApplicationDAOImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 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/impl/application/GenericApplicationDAOImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java index 213926a6c5..94a784cb39 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java @@ -56,8 +56,7 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic if (log.isDebugEnabled()) { log.debug("Request received in DAO Layer to create an application"); log.debug("ApplicationEntity Details : "); -// log.debug("App Name : " + application.getName() + " App Type : " -// + application.getType() + " User Name : " + application.getUser().getUserName()); + log.debug("App Name : " + application.getName() + " App Type : " + application.getType()); } Connection conn; PreparedStatement stmt = null; @@ -71,13 +70,13 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic + "TYPE, " + "SUB_TYPE, " + "TENANT_ID, " - + "DEVICE_TYPE_ID) VALUES (?, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS); + + "DEVICE_TYPE_ID) VALUES (?, ?, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS); stmt.setString(1, application.getName()); stmt.setString(2, application.getDescription()); stmt.setString(3, application.getType()); stmt.setString(4, application.getSubType()); stmt.setInt(5, tenantId); -// stmt.setInt(6, application.getDeviceTypeObj().getId()); + stmt.setInt(6, application.getDeviceTypeId()); stmt.executeUpdate(); rs = stmt.getGeneratedKeys();