locked
Sorting on the property of a nested collection in OData RRS feed

  • Question

  • User190263090 posted

    Hi,

    We have the object model similar to the one below,

    context.People
      .include('Children')
      .include('Children.FavoriteColor')
      .order('Name')
      .order('Children.Name')
      .order('Children.FavoriteColor.Brightness')

    There is an OData Query that needs to filter by Brightness. 

    We tried with the following 

    $expand=Children&$orderby=Children/FavoriteColor/Brightness but it gives error because the FavoriteColor is a collection. However, there is also the Primary Keys added by default in the generated SQL from EF before any of the orderby columns. 

    Kindly suggest how the filtering can be done based on the Brightness [Child collection property using OData]

    This issue is similar to this query 

    Tuesday, September 5, 2017 3:52 PM

All replies