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 2017/07/26 05:53:00 UTC
[jira] [Commented] (OLINGO-1148) Cannot set Nullable property to
null value on entity Update
[ https://issues.apache.org/jira/browse/OLINGO-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101207#comment-16101207 ]
Ramya commented on OLINGO-1148:
-------------------------------
Hi Daniel,
The fix is provided as part of commit https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=bb2517adba6294260c6215e5bc9085264792b1f9
Regards,
Ramya
> Cannot set Nullable property to null value on entity Update
> -----------------------------------------------------------
>
> Key: OLINGO-1148
> URL: https://issues.apache.org/jira/browse/OLINGO-1148
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.7, V2 2.0.8
> Reporter: Daniel Horvath
> Priority: Critical
>
> Hello colleagues,
>
> We have found a strange behaviour in the update process of an entity in Olingo (2.0.7) OData 2.0.
>
> When we try to set a property to {color:red}null{color} value it is not set but the old value remains. It is caused by the implementation of:
> {color:red}setProperty(final Method method, final Object entity, final Object entityPropertyValue,final EdmSimpleType type, String propertyName){color}
> method in {color:red}org.apache.olingo.odata2.jpa.processor.core.access.data.JPAEntity{color} class.
>
> In line 472 there is a check if the entityPropertyValue is null then skip the setting of the value completely.
> The protocol documentation says that we can use the Nullable facet on all the EDMSimpleType-s because it’s a Commonly Applicable Facet. (Section 2.2.1.1.1. in https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MC-CSDL/%5bMC-CSDL%5d.pdf)
> We think that the setting of null value to a Nullable property should be allowed.
> If you have further questions please feel free to contact me.
> Best regards,
> Daniel
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)