Skip to Content

How to set Nullable true in XSODATA Metadata for an OnPremise Hana system

Jun 15, 2017 at 08:48 AM


avatar image
Former Member


We have developed an XSODATA service which working correctly.We are consuming this service in our external which requires the metadata generated by XSODATA do display the nullable=true property .

Expected :

I basically need the property Nullable to be displayed even if it is true.

sample.png (32.3 kB)
sample2.png (23.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Thomas Jung
Jun 15, 2017 at 11:40 AM

Why exactly do you need it to explicitly state nullable=true? From the Oasis OData specification:

6.2.1 Attribute Nullable

The edm:Property element MAY contain the Nullable attribute whose Boolean value specifies whether a value is required for the property.

If no value is specified for a property whose Type attribute does not specify a collection, the Nullable attribute defaults to true. If no value is specified for a property whose Type attribute specifies a collection, the client cannot assume any default value.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Thomas Jung

Thank you for the reply.

We are using this service in SAP GATEWAY, Gateway is setting Nullable false for all values this is causing an issue with date field in Gateway, since gateway cannot accept null as a valid date.

Our landscape is HANA table that is exposed as xsOdata service that in turn is consumed by gateway and exposed to the outside world. HANA table has NULL values for a few Dates. We are generating these services using the OSCI (/IWBEP/OCI_SRV_GEN).

By setting nullable as true we can tell gateway that this variables accepts null values.Thus is in turn solving our issue with date field.

If any other alternatives solutions please do let me know.