You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by "Gupta, Nishant." <ni...@informatica.com> on 2016/10/19 11:50:53 UTC

Optional Property in Entity

Hi,

I have a use case where I need an optional property in a response entity. I set nullable field in CsdlProperty as true. CsdlProperty.setNullable(true) but still the result shows the property value as null.

Am I missing anything here? Any help will be appreciated.

Regards,
Nishant Gupta


RE: Optional Property in Entity

Posted by "Gupta, Nishant." <ni...@informatica.com>.
Thanks. It solves my doubt :)

From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: Wednesday, October 19, 2016 5:51 PM
To: user@olingo.apache.org
Subject: RE: Optional Property in Entity

Hi Nishant,

even if a property is null it will appear in the payload. This is part of the specification. If you don`t want to see certain properties then you can specify a select clause as a query parameter. Of course this will omit all properties of this name even if they have a value.

Best Regards,
Christian


From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 19. Oktober 2016 13:51
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Optional Property in Entity

Hi,

I have a use case where I need an optional property in a response entity. I set nullable field in CsdlProperty as true. CsdlProperty.setNullable(true) but still the result shows the property value as null.

Am I missing anything here? Any help will be appreciated.

Regards,
Nishant Gupta


RE: Optional Property in Entity

Posted by "Amend, Christian" <ch...@sap.com>.
Hi Nishant,

even if a property is null it will appear in the payload. This is part of the specification. If you don`t want to see certain properties then you can specify a select clause as a query parameter. Of course this will omit all properties of this name even if they have a value.

Best Regards,
Christian


From: Gupta, Nishant. [mailto:nigupta@informatica.com]
Sent: Mittwoch, 19. Oktober 2016 13:51
To: user@olingo.apache.org
Subject: Optional Property in Entity

Hi,

I have a use case where I need an optional property in a response entity. I set nullable field in CsdlProperty as true. CsdlProperty.setNullable(true) but still the result shows the property value as null.

Am I missing anything here? Any help will be appreciated.

Regards,
Nishant Gupta