olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Böhme (JIRA) <j...@apache.org>
Subject [jira] [Created] (OLINGO-1214) Nullable Facet is not properly handled on complex types
Date Mon, 11 Dec 2017 11:34:00 GMT
Artem Böhme created OLINGO-1214:
-----------------------------------

             Summary: Nullable Facet is not properly handled on complex types
                 Key: OLINGO-1214
                 URL: https://issues.apache.org/jira/browse/OLINGO-1214
             Project: Olingo
          Issue Type: Bug
          Components: odata2-core
    Affects Versions: V2 2.0.9
            Reporter: Artem Böhme


Hi,

given complex type B with property 'x' which has the facet Nullable=false
and
given the entity A with the reference to complex type B via 'b' and the facet Nullable=true
on 'b'  

This combination produces the error "The metadata do not allow a null value." at 

{{EntityProvider.writeEntry(contentType, targetEntitySet, data,					EntityProviderWriteProperties.serviceRoot(getContext().getPathInfo().getServiceRoot()).build());}}

if the data is A and data don't contain the key 'b'.

If i debug into the code, I can see that the problem is the property 'x' which is not nullable,
but in the described situation I don't have the 'b' at all (which can be nullable).

I think the lines 76 to 95 in {{org.apache.olingo.odata2.core.ep.producer.JsonPropertyEntityProducer}}
should be reviewed to handle the described case correctly. 

Please let me know, if you need more context info!

Best regards,
Artem 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message