-
Notifications
You must be signed in to change notification settings - Fork 56
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
'not' operator is being applied only to the first condition with and/or operators #43
Comments
I can't implement { not: { prop: { in: [...] } } } pattern. I couldn't succeed to use NOT with IN operator. |
bump |
As of the current version (09/2022), brackets are always put around what follows @hakan-bilgin I do exactly that and it works with the current version. Note that the generated |
I've tried to use the new 'not' operator for some of my logic while I noticed it doesn't get applied correctly - it is applied 'not' to the first condition instead of the whole group
It loolks like the example presents the issue as well:
const filter = {
not: {
and:[
{SomeProp: 1},
{AnotherProp: 2}
]
}
};
buildQuery({ filter })
=> '?$filter=(not (SomeProp eq 1) and (AnotherProp eq 2))'
It should be
=> '?$filter=(not ((SomeProp eq 1) and (AnotherProp eq 2)))'
as otherwise it would be considered as
(not SomeProp eq 1)
and (AnotherProp eq 2)
The text was updated successfully, but these errors were encountered: