diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GenericApplicationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GenericApplicationDAOImpl.java index d3362041c3..367f71f612 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GenericApplicationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GenericApplicationDAOImpl.java @@ -44,11 +44,11 @@ public class GenericApplicationDAOImpl extends AbstractApplicationDAOImpl{ List applicationIds = new ArrayList<>(); try { conn = this.getConnection(); - stmt = conn.prepareStatement("INSERT INTO DM_APPLICATION (NAME, PLATFORM, CATEGORY, " + - "VERSION, TYPE, LOCATION_URL, IMAGE_URL, TENANT_ID,APP_PROPERTIES, APP_IDENTIFIER, MEMORY_USAGE, IS_ACTIVE) " + + stmt = conn.prepareStatement("INSERT INTO DM_APPLICATION (NAME, PLATFORM, " + + "CATEGORY, VERSION, TYPE, LOCATION_URL, IMAGE_URL, TENANT_ID,APP_PROPERTIES, " + + "APP_IDENTIFIER, MEMORY_USAGE, IS_ACTIVE) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new String[]{"id"}); - for (Application application : applications) { stmt.setString(1, application.getName()); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/PostgreSQLApplicationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/PostgreSQLApplicationDAOImpl.java index c2411337c1..a6a5078323 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/PostgreSQLApplicationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/PostgreSQLApplicationDAOImpl.java @@ -44,11 +44,11 @@ public class PostgreSQLApplicationDAOImpl extends AbstractApplicationDAOImpl{ List applicationIds = new ArrayList<>(); try { conn = this.getConnection(); - stmt = conn.prepareStatement("INSERT INTO DM_APPLICATION (NAME, PLATFORM, CATEGORY, " + - "VERSION, TYPE, LOCATION_URL, IMAGE_URL, TENANT_ID,APP_PROPERTIES, APP_IDENTIFIER, MEMORY_USAGE, IS_ACTIVE) " + + stmt = conn.prepareStatement("INSERT INTO DM_APPLICATION (NAME, PLATFORM, " + + "CATEGORY, VERSION, TYPE, LOCATION_URL, IMAGE_URL, TENANT_ID,APP_PROPERTIES, " + + "APP_IDENTIFIER, MEMORY_USAGE, IS_ACTIVE) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new String[]{"id"}); - for (Application application : applications) { stmt.setString(1, application.getName());