Christian Asmussen created OLINGO-1503:
------------------------------------------

             Summary: JsonDeserializer fails to recognize type of entity type 
collection properties with EDM
                 Key: OLINGO-1503
                 URL: https://issues.apache.org/jira/browse/OLINGO-1503
             Project: Olingo
          Issue Type: Bug
          Components: odata4-client
    Affects Versions: (Java) V4 4.7.1
            Reporter: Christian Asmussen


In  
[org.apache.olingo.client.core.serialization.JsonDeserializer:345|https://gitbox.apache.org/repos/asf?p=olingo-odata4.git;a=blob;f=lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/JsonDeserializer.java;h=ddde0afa5aa04481c4506c05f9d683a754d07fb6;hb=HEAD#l350]
  
{noformat}
final Object value = fromComplex((ObjectNode) child, codec);
if (childType != null) {
    ((ComplexValue)value).setTypeName(childType.external());
}
{noformat}
 sets the collection TypeName prefixed with "#" and thus it is is not found in 
the Edm.

This causes properties in ComplexValue collection elements (e.g. date) to be 
interpreted as String.

Some anecdotal testing has demonstrated that using childType.internal() fixes 
the issue.

Unfortunately I am pressed for time an unable to provide proper steps to verify 
it, but I figured if it is indeed a mistake of using external() instead of 
internal() whoever wrote this code might be able to recognize it and fix it.

[~i050510] if I'm not mistaken...

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to