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

Filter usage operators add route entity alias to query string causing error #126

Open
shooresh-golzari-cko opened this issue May 10, 2024 · 0 comments
Labels
analysis Problem analysis

Comments

@shooresh-golzari-cko
Copy link

shooresh-golzari-cko commented May 10, 2024

 var uri = new ODataQueryBuilder()
            .For<Entity>("entity")
            .ByList()
            .Filter((e, f, o) =>
                o.Any(e.SubEntity, se => se.ColA == value && se.Version == e.LatestVersion)).ToUri();

Actual queryString:
entity?$filter=subEntity/any(se:se/colA eq 'value' and se/version eq e/latestVersion)

error: "Could not find a property named 'e' on type 'Entity'."

Expected queryString
entity?$filter=subEntity/any(se:se/colA eq 'value' and se/version eq latestVersion)

Works as expected

Package Version: 2.9.10

@ZEXSM ZEXSM added the analysis Problem analysis label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Problem analysis
Projects
None yet
Development

No branches or pull requests

2 participants