diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java index fbe4623..924057a 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java @@ -894,7 +894,12 @@ public abstract class ElementManagement { return PropertyElementManagement.getPropertyDocument(value); case ARRAY: - return value; + List list = new ArrayList<>(); + ArrayNode arrayNode = (ArrayNode) value; + for(JsonNode node : arrayNode) { + list.add(getObjectFromJsonNode(node)); + } + return list; case BINARY: break; @@ -1076,9 +1081,13 @@ public abstract class ElementManagement { if(object != null) { if(object instanceof ODocument) { element.setProperty(key, object, OType.EMBEDDED); - }else if(object instanceof ArrayNode){ + /* + * Update is not allowed, + * hence bug https://github.com/orientechnologies/orientdb/issues/7354 cannot occur + */ + } else if(object instanceof List){ element.setProperty(key, object, OType.EMBEDDEDLIST); - }else { + } else { element.setProperty(key, object); } }