Github user shawnfeldman commented on a diff in the pull request: https://github.com/apache/incubator-usergrid/pull/323#discussion_r35879482 --- Diff: stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpEntityMapUtils.java --- @@ -160,217 +101,8 @@ public static Entity fromMap( */ public static Map toMap(EntityObject entity) { - Map<String, Object> entityMap = new TreeMap<>(); - - for (Object f : entity.getFields().toArray()) { - Field field = (Field) f; - - if (f instanceof ListField || f instanceof ArrayField) { - List list = (List) field.getValue(); - entityMap.put(field.getName(), - new ArrayList( processCollectionForMap(list))); - - } else if (f instanceof SetField) { - Set set = (Set) field.getValue(); - entityMap.put(field.getName(), - new ArrayList( processCollectionForMap(set))); - - } else if (f instanceof EntityObjectField) { - EntityObject eo = (EntityObject) field.getValue(); - entityMap.put( field.getName(), toMap(eo)); // recursion - - } else if (f instanceof StringField) { - entityMap.put(field.getName(), ((String) field.getValue())); - - } else if (f instanceof LocationField) { - LocationField locField = (LocationField) f; - Map<String, Object> locMap = new HashMap<String, Object>(); - - // field names lat and lon trigger ElasticSearch geo location - locMap.put("lat", locField.getValue().getLatitude()); - locMap.put("lon", locField.getValue().getLongitude()); - entityMap.put( field.getName(), field.getValue()); --- End diff -- serializes wrong value
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---