From 0f401090c0ca758de7c218bf81c69d189b2da3cb Mon Sep 17 00:00:00 2001 From: Dulitha Wijewantha Date: Tue, 21 Apr 2015 14:00:22 +0530 Subject: [PATCH] * Changing sql ID to correct name --- .../mgt/mobile/impl/ios/dao/impl/FeatureDAOImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/dao/impl/FeatureDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/dao/impl/FeatureDAOImpl.java index 756978b45..275a65132 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/dao/impl/FeatureDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/dao/impl/FeatureDAOImpl.java @@ -96,7 +96,7 @@ public class FeatureDAOImpl implements MobileFeatureDAO { ResultSet rs = null; try { Connection conn = MobileDeviceManagementDAOFactory.getConnection(); - String sql = "SELECT ID, CODE, NAME, DESCRIPTION FROM IOS_FEATURE WHERE CODE = ?"; + String sql = "SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM IOS_FEATURE WHERE CODE = ?"; stmt = conn.prepareStatement(sql); stmt.setString(1, mblFeatureCode); rs = stmt.executeQuery(); @@ -130,16 +130,17 @@ public class FeatureDAOImpl implements MobileFeatureDAO { List features = new ArrayList(); try { Connection conn = MobileDeviceManagementDAOFactory.getConnection(); - String sql = "SELECT ID, CODE, NAME, DESCRIPTION FROM IOS_FEATURE"; + String sql = "SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM IOS_FEATURE"; stmt = conn.prepareStatement(sql); rs = stmt.executeQuery(); while (rs.next()) { MobileFeature feature = new MobileFeature(); - feature.setId(rs.getInt("ID")); + feature.setId(rs.getInt("FEATURE_ID")); feature.setCode(rs.getString("CODE")); feature.setName(rs.getString("NAME")); feature.setDescription(rs.getString("DESCRIPTION")); + features.add(feature); } return features; } catch (SQLException e) {