techniq/odata-query

Nested filter on collections not constructing proper prefixes

fabio-b opened this issue · 1 comments

Hello, any help would be appreciated!
When filtering inside an $expand, the lamda that gets applied is missing the necessary prefixes.

Input:

{ expand: { Item: { filter: { any: { ItemsProp: true } } } } }

output:

$expand=Item($filter=any/ItemsProp eq true)

Expected output:

$expand=Item($filter=Item/any(x:x/ItemsProp eq true))

Regular top level filter applies the proper lamda. Is this a problem in how I'm constructing the object?

Thanks

I feel dumb now, I figured it out. Didn't realize I didn't try adding the Item again under the filter. Thanks anyway, your projects have helped immensely!

expand: {
  Item: {
    filter: {
      Item: { 
        any: { ItemsProp: true }
      }
    }
  }
}