Search code examples
wcfserviceodatanetflix

How do I perform projection on expanded entities in OData?


When I execute the following OData query I see a particular Netflix title with its awards expanded.

http://odata.netflix.com/Catalog/Titles?$filter=Name eq 'The Name of The Rose'&$expand=Awards&$select=Rating,Awards

Note that I have projected just the Rating property of the title.

Can I also project ($select) specific properties of the expanded awards? That is, for each Award in the expansion, show me only the Category and Year properties.


Solution

  • Sure, just modify the query to include:

    $select=Rating,Awards/Category,Awards/Year