[ https://issues.apache.org/jira/browse/OLINGO-931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15240500#comment-15240500 ]
Anirban Das commented on OLINGO-931: ------------------------------------ Hi Micheal/Ramesh Thanks for your reply. Unfortunately I still need a few clarifications. -> Is it necessary to set the value of the ID even if the entity has the value of the id in form of a property.(It is absent only in the select query of the request , not in the entity object returned from the server). ->Is there a specific reason we are not @odata.id tag (from entity.getid()) when all properties are requested or the key predicates are present in the select query. I do understand that this will be compulsory going forward , to meet the odata metadata requirements. -> Given that the value of the ID required is an URI, and dataproviders would be agnostic of server info, could you give me an example of what value needs to set to the Id field. Regards Anirban > $select does not work with JsonSerializer > ----------------------------------------- > > Key: OLINGO-931 > URL: https://issues.apache.org/jira/browse/OLINGO-931 > Project: Olingo > Issue Type: Bug > Components: odata4-server > Affects Versions: (Java) V4 4.2.0 > Reporter: Anirban Das > Assignee: Michael Bolz > > When we fire a Odata request whith $select and requested format as json > for eg > /Customer?$select=Type,CustomerName&$format=json > The OdataSerializer throws a null pointer exception. Alson Note when > requesting a xml format there is no issue with the request above and gives > back the result correctly > StackTrace for reference:: > java.lang.NullPointerException > at > org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeEntity(ODataJsonSerializer.java:329) > at > org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeEntitySet(ODataJsonSerializer.java:273) > at > org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeExpandedNavigationProperty(ODataJsonSerializer.java:459) > at > org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeNavigationProperties(ODataJsonSerializer.java:420) > at > org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeEntity(ODataJsonSerializer.java:332) > at > org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeEntitySet(ODataJsonSerializer.java:273) > at > org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.entityCollection(ODataJsonSerializer.java:165) -- This message was sent by Atlassian JIRA (v6.3.4#6332)