REST OData nested objects

Stimulsoft Ultimate discussion
Post Reply
dvv153m
Posts: 6
Joined: Fri May 14, 2021 4:09 pm

REST OData nested objects

Post by dvv153m »

Does the Stimulsoft designer know how to work with a REST OData data source with nested objects?
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: REST OData nested objects

Post by Lech Kulikowski »

Hello,

All nested objects will be presented as separate tables with relations:
https://www.stimulsoft.com/en/documenta ... report.htm

Thank you.
dvv153m
Posts: 6
Joined: Fri May 14, 2021 4:09 pm

Re: REST OData nested objects

Post by dvv153m »

My OData service is http://95.213.239.58:12118/odata-api
returns a collection of City objects. Within each City object, there is a nested collection of Street objects.
Type description here http://95.213.239.58:12118/odata-api/$metadata
When I add the OData service in the stimulsoft designer, a separate table for Street objects is not created. Is that how it should be?
Image
https://ibb.co/82jtc3L
dvv153m
Posts: 6
Joined: Fri May 14, 2021 4:09 pm

Re: REST OData nested objects

Post by dvv153m »

Solved a problem.
Now a plate is automatically created for the nested object in the StimulSoft designer.
It was necessary to mark the nested object as a navigation property.
In the place where the Edmx model was described it was written like this
edmBuilder.EntitySet <City> ("ReportOData");
but it was necessary to add a description of the navigation property like this
var city = edmBuilder.EntitySet <City> ("ReportOData");
city.HasManyBinding (c => c.Streets, "Streets");
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: REST OData nested objects

Post by Lech Kulikowski »

Hello,

Thank you for the information.
joshuadmatthews
Posts: 2
Joined: Wed Jul 05, 2023 7:11 pm

Re: REST OData nested objects

Post by joshuadmatthews »

I am using an API I don't control and the Stimulsoft JS version, and apparently the API isn't using this method to describe the nested objects because I'm not seeing a different table created. Is there a way I can manually fix things up within the report designer so I can access this nested data?
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: REST OData nested objects

Post by Lech Kulikowski »

Hello,

You can add all your sources as separate flat tables and then add relations between nested objects.

Thank you.
Post Reply