From d6923a1343e7ac9a239756acc683e7e68882237c Mon Sep 17 00:00:00 2001 From: geethkokila Date: Fri, 1 Apr 2016 00:25:09 +0530 Subject: [PATCH] Fixing the issue in single condition --- .../device/mgt/core/search/mgt/impl/QueryBuilderImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/QueryBuilderImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/QueryBuilderImpl.java index 9dc36109c4..cf4d2a03d6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/QueryBuilderImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/QueryBuilderImpl.java @@ -50,8 +50,8 @@ public class QueryBuilderImpl implements QueryBuilder { if (conditions.get(0).getKey().equalsIgnoreCase(Constants.LOCATION)) { locConditon = conditions.get(0); - } else if (Utils.getDeviceDetailsColumnNames().containsKey(conditions.get(0)) || - Utils.getDeviceLocationColumnNames().containsKey(conditions.get(0))) { + } else if (Utils.getDeviceDetailsColumnNames().containsKey(conditions.get(0).getKey()) || + Utils.getDeviceLocationColumnNames().containsKey(conditions.get(0).getKey())) { andColumns.add(conditions.get(0)); } else { otherANDColumns.add(conditions.get(0));