code: public void fillUpdatedCollectionProperty(Object entity, Object currentNode, StructuralProperty property,
                                                Field field, String node, Map<String, Object> map) throws ODataException {
  
          Collection<Object> valueSet;
          if (field.getType().isAssignableFrom(Set.class)) {
              valueSet = new HashSet<>();
          } else {
              valueSet = new ArrayList<>();
          }
  
          Object current = (currentNode instanceof Map) ? currentNode : map.get(currentNode);
          for (Object subValue : (Iterable) ((Map) current).get(node)) {
              Object value = getFieldValueByType(property.getElementTypeName(), subValue, map, true);
  
              if (value != null) {
                  valueSet.add(value);
              }
          }
          setFieldValue(field, entity, valueSet);
      }
docs: Populates the collection property with the relevant field values.
  
  @param entity      the entity
  @param currentNode the current node to to process
  @param property    the embedded collection
  @param field       the Java field
  @param node        the node
  @param map         the map of field values
  @throws ODataException If unable to update collection properties