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

Invalid filter construction using Filter API #11

Open
TheAifam5 opened this issue Jan 9, 2020 · 1 comment
Open

Invalid filter construction using Filter API #11

TheAifam5 opened this issue Jan 9, 2020 · 1 comment

Comments

@TheAifam5
Copy link

Code:

new FilterLogical(
    [
    new FilterLambda(
        LambdaCollection.ENTITY_SET,
        'test123',
        LambdaOperator.ANY,
        new FilterLogical(
        [
            new FilterComparison(
            'id',
            OperatorComparison.EQ,
            new QuotedString(this.id),
            ),
            new FilterComparison(
            'enabled',
            OperatorComparison.EQ,
            this.enabled,
            ),
        ],
        OperatorLogical.AND,
        ),
    ),
    ],
    OperatorLogical.NOT,
),

Generates:

((not test123/any(x:x/(id eq '123456asdasda' and enabled eq false))))

Should be:
not test123/Any(w: w/id eq '123456asdasda' and w/enabled eq false)

.NET Core OData returns:

The query specified in the URI is not valid. Syntax error at position 23 in '((not test123/any(x:x/(id eq '123456asdasda' and enabled eq false))))'.
@riccardomariani
Copy link
Owner

Sorry, I didn't receive a notification about this issue. I'm on vacation right now, but I'll try to fix this issue as soon as possible.

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

2 participants