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
System.NotSupportedException: The query specified in the URI is not valid. Binding OData QueryNode of kind 'SingleResourceCast' is not supported by 'AggregationBinder'.
Stack trace :
at Microsoft.AspNetCore.OData.Query.Expressions.TransformationBinderBase.BindAccessor(QueryNode node, Expression baseElement)
at Microsoft.AspNetCore.OData.Query.Expressions.TransformationBinderBase.BindAccessor(QueryNode node, Expression baseElement)
at Microsoft.AspNetCore.OData.Query.Expressions.AggregationBinder.CreateGroupByMemberAssignments(IEnumerable`1 nodes)
at Microsoft.AspNetCore.OData.Query.Expressions.AggregationBinder.BindGroupBy(IQueryable query)
at Microsoft.AspNetCore.OData.Query.Expressions.AggregationBinder.Bind(IQueryable query)
at Microsoft.AspNetCore.OData.Query.ApplyQueryOption.ApplyTo(IQueryable query, ODataQuerySettings querySettings)
at Microsoft.AspNetCore.OData.Query.ODataQueryOptions.ApplyTo(IQueryable query, ODataQuerySettings querySettings)
at Microsoft.AspNetCore.OData.Query.EnableQueryAttribute.ApplyQuery(IQueryable queryable, ODataQueryOptions queryOptions)
at Microsoft.AspNetCore.OData.Query.EnableQueryAttribute.ExecuteQuery(Object responseValue, IQueryable singleResultCollection, ControllerActionDescriptor actionDescriptor, HttpRequest request)
at Microsoft.AspNetCore.OData.Query.EnableQueryAttribute.OnActionExecuted(ActionExecutedContext actionExecutedContext, Object responseValue, IQueryable singleResultCollection, ControllerActionDescriptor actionDescriptor, HttpRequest request)
The text was updated successfully, but these errors were encountered:
Hello,
I have a case where I want to group by a property of a derived type :
An error indicating that this is not supported is thrown.
I would have expected it to be possible. Is it a lack or are there reasons why it's not possible?
Knowing that using a derived type in a filter clause works :
Assemblies affected
Microsoft.AspNetCore.OData 8.2.4
Reproduce steps
It should open the
/products?apply=groupby((category/ODataGroupByDerivedTypeIssue.Models.Category/categoryName))
URL.Expected result
Actual result
The following error :
Stack trace :
The text was updated successfully, but these errors were encountered: