Filter with Any clause bad conversion
Hi, thank you for your amazing query builder.
I ran into this problem: if I pass a filter object with this structure:
{ "Module1/Module_CategoryModule": { "any": { "Module_CategoryId": { "eq": 2 } } } }
I get this query, which throws a Syntax error in Restier OData:
$filter=((Module1/Module_CategoryModule/any(module1/module_categorymodule:module1/module_categorymodule/Module_CategoryId%20eq%202)))
but actually the correct conversion would be this:
$filter=((Module1/Module_CategoryModule/any(c:c/Module_CategoryId%20eq%202)))
Did I do something wrong in the filter syntax?
Thank you Marco
Faced the same problem recently. The solution is not to use nested property accessors like 'Module1/Module_CategoryModule', but instead nest property access in objects like this:
{ Module1: { Module_CategoryModule: { any: { Module_CategoryId: { eq: 2 } } } } }
This approach generates a filter like so:
$filter=((Module1/Module_CategoryModule/any(module_categorymodule:module_categorymodule/Module_CategoryId eq 2)))