simple-odata-client / Simple.OData.Client

MIT License
331 stars 197 forks source link

NullReferenceException in ResponseReader.CreateAnnotations #688

Open ig-robstoffers opened 5 years ago

ig-robstoffers commented 5 years ago

I'm using the latest NuGet package (5.10.0.1) and running into a null reference exception when trying to run a grouping query. https://services.odata.org/TripPinRESTierService/(S(iebzmrfqw2dzcaunofkhg3uk))/People?$apply=groupby((LastName))

It is throwing the exception on this line:

https://github.com/simple-odata-client/Simple.OData.Client/blob/61dc9fd08e877a9e52812bce4c1d9b5e109f41ed/src/Simple.OData.Client.V4.Adapter/ResponseReader.cs#L218

The above query response contains @odata.ids with null values which is probably why odataEntry.Id is null.

fstandhartinger commented 5 years ago

me too, got the same issue

naresh1990 commented 4 years ago

all the standard aggregated odata response will contain @odata.id as null. this is failing for odata aggregated calls.

any workaround available or any tentative timeline for fix?