Is $expand flat?
-
Tuesday, September 11, 2012 11:10 PM
Hi all;
I'm looking at http://services.odata.org/Northwind/Northwind.svc/Employees?$expand=Territories,Orders and it returns a series of entries, each with 2 feeds in it (Territories and Orders). Can a uri be requested where inside those feeds there will be sub-feeds for additional entries?
Or is it that you will have the base entry and it will have 0 ... N feeds, but all feeds are in that base entry?
thanks - dave
Who will win The International Collegiate Programming Championships?
All Replies
-
Wednesday, September 12, 2012 7:41 AMModerator
Hi,
Expansions are not flat (or not always). You can expand deeper. For example http://services.odata.org/Northwind/Northwind.svc/Employees?$expand=Territories,Orders,Orders/Order_Details&$top=1
Thanks,
Vitek Karas [MSFT]
- Marked As Answer by DavidThi808 Wednesday, September 12, 2012 1:04 PM
-
Wednesday, September 12, 2012 1:06 PM
Ok, that's what we're coding for.
Is there a sample OData service out there that will page in the middle of $expand feeds? We need to test this code we're writing.
??? - thanks - dave
Who will win The International Collegiate Programming Championships?
-
Wednesday, September 12, 2012 1:28 PMModerator
Try http://odata.netflix.com/v2/Catalog/Genres?$top=2&$expand=Titles&$select=Titles/Name (but it's big, so beware !!! :-))
Thanks,
Vitek Karas [MSFT]

