Skip to content
New issue

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

Filter does not support in expression #31

Open
kanusiewicz opened this issue Jan 30, 2019 · 4 comments
Open

Filter does not support in expression #31

kanusiewicz opened this issue Jan 30, 2019 · 4 comments

Comments

@kanusiewicz
Copy link

sample filter: Param in (0,100)

throws exception:

"ExceptionType": "System.NotImplementedException",
"StackTrace": " w Microsoft.OData.UriParser.QueryNodeVisitor1.Visit(InNode nodeIn)\r\n w Microsoft.OData.UriParser.InNode.Accept[T](QueryNodeVisitor1 visitor)\r\n w Community.OData.Linq.OData.Query.ParameterAliasNodeTranslator.Visit(ConvertNode nodeIn)\r\n w Microsoft.OData.UriParser.ConvertNode.Accept[T](QueryNodeVisitor1 visitor)\r\n w Community.OData.Linq.OData.Query.ParameterAliasNodeTranslator.Visit(BinaryOperatorNode nodeIn)\r\n w Microsoft.OData.UriParser.BinaryOperatorNode.Accept[T](QueryNodeVisitor1 visitor)\r\n w Community.OData.Linq.OData.Query.ParameterAliasNodeTranslator.Visit(BinaryOperatorNode nodeIn)\r\n w Microsoft.OData.UriParser.BinaryOperatorNode.Accept[T](QueryNodeVisitor1 visitor)\r\n w Community.OData.Linq.OData.Query.ParameterAliasNodeTranslator.Visit(BinaryOperatorNode nodeIn)\r\n w Microsoft.OData.UriParser.BinaryOperatorNode.Accept[T](QueryNodeVisitor1 visitor)\r\n w Community.OData.Linq.ODataLinqExtensions.Filter[T](ODataQuery`1 query, String filterText, String entitySetName)\r\n w AbcData.Services.News.DataModel.NewsODataService.GetNews(String filter) w

@IharYakimush
Copy link
Owner

"In" logical operator is part of OData 4.01 (http://docs.oasis-open.org/odata/odata/v4.01/csprd02/part2-url-conventions/odata-v4.01-csprd02-part2-url-conventions.html).

Current project support only OData 4.0. It should throw ODataException with message about "Syntax error".

It looks like you using Microsoft.OData.Core of latest version which already can work with "In", so you got another exception.

@rtellez91
Copy link

Hi, so is there any workaround for that? I suppose that we can only rewrite de query in a multiple ORs way. Do you plan to add it as a support?

@GuusDb
Copy link

GuusDb commented Apr 5, 2023

same issue here, is there a workaround. really need to use the in operator.

@mosqic33
Copy link

This problem also occurred when I used the in operator. Is there any solution?

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.NotImplementedException: The method or operation is not implemented.
at Microsoft.OData.UriParser.QueryNodeVisitor1.Visit(InNode nodeIn) at Microsoft.OData.UriParser.InNode.Accept[T](QueryNodeVisitor1 visitor)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants