We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a parameter alias is used as the collection of an in $filter, OData throws an unhandled exception.
in
$filter
Possibly all. Observed in ODL 8.1.0 and 8.2.2.
var model = new EdmModel(); var person = new EdmEntityType("my.namespace", "person"); person.AddKeys(person.AddStructuralProperty("id", EdmPrimitiveTypeKind.String)); model.AddElement(person); var container = new EdmEntityContainer("my.namespace", "container"); model.AddElement(container); container.AddEntitySet("people", person); var parser = new ODataUriParser(model, new Uri("""/people?$filter=id in @ids&@ids=["foo"]""", UriKind.Relative)) { Resolver = new UnqualifiedODataUriResolver() { EnableCaseInsensitive = true }, UrlKeyDelimiter = ODataUrlKeyDelimiter.Slash, }; parser.Settings.MaximumExpansionDepth = 2; parser.ParsePath(); var filter = parser.ParseFilter();
An ODataException if this is not intended to be supported, or the same behavior as when parameter aliases are not used.
ODataException
Unhandled exception thrown by ODL:
System.ArgumentNullException: Value cannot be null. (Parameter 'type') Stack Trace: EdmUtil.CheckArgumentNull[T](T value, String parameterName) EdmTypeSemantics.IsStructured(IEdmTypeReference type) ParameterAliasBinder.ParseComplexOrCollectionAlias(QueryToken queryToken, IEdmTypeReference parameterType, IEdmModel model) ParameterAliasBinder.ParseAndBindParameterAliasValueExpression(BindingState bindingState, String aliasValueExpression, IEdmTypeReference parameterType) ParameterAliasBinder.BindParameterAlias(BindingState bindingState, FunctionParameterAliasToken aliasToken) MetadataBinder.BindParameterAlias(FunctionParameterAliasToken functionParameterAliasToken) MetadataBinder.Bind(QueryToken token) MetadataBinder.<BindIn>b__22_0(QueryToken queryToken) InBinder.GetCollectionOperandFromToken(QueryToken queryToken, IEdmTypeReference expectedType, IEdmModel model) InBinder.BindInOperator(InToken inToken, BindingState state) MetadataBinder.BindIn(InToken inToken) MetadataBinder.Bind(QueryToken token) FilterBinder.BindFilter(QueryToken filter) ODataQueryOptionParser.ParseFilterImplementation(String filter, ODataUriParserConfiguration configuration, ODataPathInfo odataPathInfo) ODataQueryOptionParser.ParseFilter() ODataUriParser.ParseFilter()
The text was updated successfully, but these errors were encountered:
marabooy
No branches or pull requests
When a parameter alias is used as the collection of an
in
$filter
, OData throws an unhandled exception.Assemblies affected
Possibly all. Observed in ODL 8.1.0 and 8.2.2.
Reproduce steps
Expected result
An
ODataException
if this is not intended to be supported, or the same behavior as when parameter aliases are not used.Actual result
Unhandled exception thrown by ODL:
The text was updated successfully, but these errors were encountered: