You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ramya (JIRA)" <ji...@apache.org> on 2018/01/31 08:55:00 UTC
[jira] [Commented] (OLINGO-1214) Nullable Facet is not properly
handled on complex types
[ https://issues.apache.org/jira/browse/OLINGO-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346459#comment-16346459 ]
Ramya commented on OLINGO-1214:
-------------------------------
Hi,
I am unable to reproduce this issue.
I have a complex Property Location in Entity A with nullable set to true and Type is CT
I have a Complex Type CT which has a property City with nullable set to false.
My payload does not have Location but has all other properties of Entity A. The EntityProviderWriteProperties is set as below
EntityProviderWriteProperties.serviceRoot(URI.create(<URI>)).build();
The serializer is working fine with this.
Can you give more details so that i can reproduce the issue.
Regards,
Ramya
> 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
> Priority: Major
>
> 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
(v7.6.3#76005)