You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm able to filter an OData collection by a derived type by using the $filter=isOf('Namespace.DerivedType') query option and function for example, but I can't sort the collection by its type.
For example, trying to use [email protected] returns: The query specified in the URI is not valid. Could not find a property named '@odata.type' on type 'Namespace.BaseType'.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi.
I'm able to filter an OData collection by a derived type by using the
$filter=isOf('Namespace.DerivedType')
query option and function for example, but I can't sort the collection by its type.For example, trying to use
[email protected]
returns:The query specified in the URI is not valid. Could not find a property named '@odata.type' on type 'Namespace.BaseType'.
I found a discussion from 2016 with an approach to solve the issue:
https://groups.google.com/g/odata-discussion/c/TIQEn2FDdNY
Is this approach still the recommended approach, or are there any other recommendations?
I haven't found any complete examples using a custom sortable function.
Would I be able to define it once and reuse it for different entity collections?
Would it accept and return a collection?
I only found mentions of the syntax to use a function in the Azure Cognitive Search orderby query option:
https://docs.microsoft.com/en-us/azure/search/search-query-odata-orderby
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions