diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 55f334c64..1d3f67901 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,4 +1,5 @@ - [cygnus-common] [MongoDB] fix error about reindex when datamodel changed +- [cygnus-common] [Arcgis] check featureId ignore case (#2320) - [cygnus-common] [Arcgis] check object_id ignore case (#2313) - [cygnus-common] [Arcgis] fix url quoted based on uniqueFieldType (#2311) - [cygnus-common] [SQL] Add Primary Key on Timestamp to Error Log table (#2302) diff --git a/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java b/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java index 796f14e2f..a2926b717 100644 --- a/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java +++ b/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java @@ -388,7 +388,7 @@ protected void splitFeatureListIfExists(List featureArray, Feature serverFeature = serverFeatures.get(i); String serverFeatureId = serverFeature.getAttributes().get(uniqueField).toString(); - if (featureId.equals(serverFeatureId)) { + if (featureId.equalsIgnoreCase(serverFeatureId)) { found = true; Integer oid = serverFeature.getObjectId(); feature.setObjectId(oid); @@ -622,7 +622,15 @@ public int getErrorCode() { * @return */ public boolean hasAttribute(String attName) { - return arcGISFeatureTable.getTableAttributes().containsKey(attName); + // return arcGISFeatureTable.getTableAttributes().containsKey(attName); + // Check containsKey but both in lowerCase + Map map = arcGISFeatureTable.getTableAttributes(); + for (Map.Entry entry : map.entrySet()) { + if (entry.getKey().toLowerCase().equals(attName.toLowerCase())) { + return true; + } + } + return false; } /**