You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unused let in the LINQ expression changes result of Query #402
(from invoice in Session.Query.All<Invoice>()
let foo = invoice.InvoiceId.In(nonExistingIds) // This line incorrectly works as additional filter.
// Must not have any impact
where invoice.InvoiceId.In(existingIds)
select invoice).Count();
It is a simlified example.
In the real app we discovered the same effect with used variable in let.
We thought the behavior changed after merging https://github.com/dataObjects-net/dataobjects-net commits for last 7 months.
But after some investigation I see the bug is here for longer time, may be from the beginning.
changed the title [-]Unused `let` in the LINQ expression makes query incorrect[/-][+]Unused `let` in the LINQ expression changes result of Query[/+]on Oct 31, 2024
Two problems were discovered during investigation of this case
incorrect visit of GroupBy key expression
wrong mapping of Include provider which lead to incorrect reference to source collection for IN statement.
First issue appeared after changes released in 6.0.13 and traversed to newer branches via merge.
@SergeiPavlov the PR that fixes both of issues, and because root of at least one of problems lied in 6.0 branch I had to resolve it there. Soon these changes will be merged into newer branches
Activity
[-]Unused `let` in the LINQ expression makes query incorrect[/-][+]Unused `let` in the LINQ expression changes result of Query[/+]Fix DataObjects-NET#402:
Revert "Fix DataObjects-NET#402:"
Disable `RedundantColumnOptimizer` as a workaround of `.In()` in `let…
alex-kulakov commentedon Dec 4, 2024
Two problems were discovered during investigation of this case
First issue appeared after changes released in 6.0.13 and traversed to newer branches via merge.
@SergeiPavlov the PR that fixes both of issues, and because root of at least one of problems lied in 6.0 branch I had to resolve it there. Soon these changes will be merged into newer branches
Merge pull request #405 from DataObjects-NET/6.0-include-related-issues