[
https://issues.apache.org/jira/browse/OLINGO-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Horvath updated OLINGO-1148:
-----------------------------------
Affects Version/s: V2 2.0.8
> 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)