Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: Unbound function should can be called in query option. [1630]

$
0
0
If below url is requested:
~/ConventionCustomers?$filter=WebStack.QA.Test.OData.UnBoundFunction.GetConventionCustomerNameById(CustomerId%3D407)%20eq%20'Name%207'

Where ConventionCustomers is an entity set, and GetConventionCustomerNameById is an unbound function.

It reports error:

HTTP/1.1 500 Internal Server Error
Content-Length: 6628
Content-Type: application/json; odata.metadata=minimal; streaming=true; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
OData-Version: 4.0
Date: Fri, 17 Jan 2014 03:49:41 GMT

{
"@odata.error":{
"code":"","message":{
"lang":"en-US","value":"An error has occurred."
},"innererror":{
"message":"Unable to cast object of type 'Microsoft.OData.Edm.Library.EdmPrimitiveTypeReference' to type 'Microsoft.OData.Edm.IEdmStringTypeReference'.","type":"System.InvalidCastException","stacktrace":"
at Microsoft.OData.Edm.EdmElementComparer.IsEquivalentTo(IEdmPrimitiveTypeReference thisType, IEdmPrimitiveTypeReference otherType)\r\n
at Microsoft.OData.Edm.EdmElementComparer.IsEquivalentTo(IEdmTypeReference thisType, IEdmTypeReference otherType)\r\n
at Microsoft.OData.Core.UriParser.TypePromotionUtils.CanPromoteNodeTo(SingleValueNode sourceNodeOrNull, IEdmTypeReference sourceType, IEdmTypeReference targetType)\r\n
at Microsoft.OData.Core.UriParser.TypePromotionUtils.IsApplicable(FunctionSignature signature, SingleValueNode[] argumentNodes, IEdmTypeReference[] argumentTypes)\r\n
at Microsoft.OData.Core.UriParser.TypePromotionUtils.<>c__DisplayClass3.<FindBestSignature>b__2(FunctionSignature signature)\r\n
at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()\r\n
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n
at Microsoft.OData.Core.UriParser.TypePromotionUtils.FindBestSignature(FunctionSignature[] signatures, SingleValueNode[] argumentNodes, IEdmTypeReference[] argumentTypes)\r\n
at Microsoft.OData.Core.UriParser.TypePromotionUtils.PromoteOperandTypes(BinaryOperatorKind operatorKind, SingleValueNode leftNode, SingleValueNode rightNode, IEdmTypeReference& left, IEdmTypeReference& right)\r\n
at Microsoft.OData.Core.UriParser.Parsers.BinaryOperatorBinder.PromoteOperandTypes(BinaryOperatorKind binaryOperatorKind, SingleValueNode& left, SingleValueNode& right)\r\n
at Microsoft.OData.Core.UriParser.Parsers.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n
at Microsoft.OData.Core.UriParser.Parsers.MetadataBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n
at Microsoft.OData.Core.UriParser.Parsers.MetadataBinder.Bind(QueryToken token)\r\n
at Microsoft.OData.Core.UriParser.Parsers.FilterBinder.BindFilter(QueryToken filter)\r\n
at Microsoft.OData.Core.UriParser.ODataUriParser.ParseFilterImplementation(String filter, IEdmType elementType, IEdmEntitySet entitySet)\r\n
at Microsoft.OData.Core.UriParser.ODataUriParser.ParseFilter(String filter, IEdmModel model, IEdmType elementType)\r\n
at System.Web.Http.OData.Query.FilterQueryOption.get_FilterClause() in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\OData\\Query\\FilterQueryOption.cs:line 66\r\n
at System.Web.Http.OData.Query.Validators.FilterQueryValidator.Validate(FilterQueryOption filterQueryOption, ODataValidationSettings settings) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\OData\\Query\\Validators\\FilterQueryValidator.cs:line 54\r\n
at System.Web.Http.OData.Query.FilterQueryOption.Validate(ODataValidationSettings validationSettings) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\OData\\Query\\FilterQueryOption.cs:line 152\r\n
at System.Web.Http.OData.Query.Validators.ODataQueryValidator.Validate(ODataQueryOptions options, ODataValidationSettings validationSettings) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\OData\\Query\\Validators\\ODataQueryValidator.cs:line 52\r\n
at System.Web.Http.OData.Query.ODataQueryOptions.Validate(ODataValidationSettings validationSettings) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\OData\\Query\\ODataQueryOptions.cs:line 380\r\n
at System.Web.Http.QueryableAttribute.ValidateQuery(HttpRequestMessage request, ODataQueryOptions queryOptions) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\QueryableAttribute.cs:line 439\r\n
at System.Web.Http.QueryableAttribute.ExecuteQuery(Object response, HttpRequestMessage request, HttpActionDescriptor actionDescriptor) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\QueryableAttribute.cs:line 498\r\n
at System.Web.Http.QueryableAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.OData\\QueryableAttribute.cs:line 383\r\n
at System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken) in c:\\WebApi\\aspnetwebstack\\src\\System.Web.Http\\Filters\\ActionFilterAttribute.cs:line 44\r\n--- End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() in c:\\WebApi\\aspnetwebstack\\src\\System.Web.Http\\Filters\\ActionFilterAttribute.cs:line 122\r\n--- End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() in c:\\WebApi\\aspnetwebstack\\src\\System.Web.Http\\Filters\\ActionFilterAttribute.cs:line 78\r\n--- End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() in c:\\WebApi\\aspnetwebstack\\src\\System.Web.Http\\Controllers\\ActionFilterResult.cs:line 46\r\n--- End of stack trace from previous location where exception was thrown ---\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__0.MoveNext() in c:\\WebApi\\aspnetwebstack\\src\\System.Web.Http\\Dispatcher\\HttpControllerDispatcher.cs:line 112"
}
}
}
Comments: ODL V4 is not support bound and unbound functions in query option now. So, postpone it to vNext.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>