Navigation Source in Filter ODataQueryOptions is skipping one level when querying for collection objects #687
Unanswered
gupta-aashika
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are trying to apply a filter query on a collection object which is two-level deep in my entity. Our entity model looks like the following:
Here is how we are building our EDM model.
The OData query looks like http://localhost/User?$filter=competitor/locations/any(m: m/name eq 'test')
The OData query translates into ODataQueryOptions which has NavigationSource. The navigation source is formed incorrectly. It skips the the competitor in the path. Internally the path segments for "locations" has only single value i.e. ["MockOpenType"]. It skips the "Competitor" entity. Due to this my resultant response is wrong.
Note: Due to some reason, the navigation source is formed correctly if I replace "CustomId" with "Id". Here the path segments is created with two values ["MockOpenType", "Competitor"] and thus the filter works fine.
Beta Was this translation helpful? Give feedback.
All reactions