-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
'must be reducible node' when aggregating over a join #5812
Comments
I did not want to open new issues, since i have identical exception. My problem is more closer to this example here: Must be reducible node exception when performing Join I am using EF Core 1.0.0. These are my models: ProjectUser
User
And this is the query that i am executing:
Exception message 'must be reducable node':
As AlexTo commented here by adding Thank you. |
I'm getting the exact same error than @bajicdusko with a very similar query. Also using EF Core v1.0.0 My query:
|
Problem was that when we do SelectMany, we should later re-map all subsequent references to the original query source, to point to the new query source (added during SelectMany nav rewrite). However we were not doing that for query sources inside a subquery. This caused incorrect query sources to be embedded in the query, which could not be translated and hence the 'must be reducible node' exception was thrown. Fix is to also replace query sources inside a subquery.
Fixed in 565df08 |
Hi, I m using the version 1.1.2 and I still have the bug:
UserFavorite:
AllowedUserPermissions
Shop, ShopChain, ShopLocation: [...] Is there a solution to fix it? |
@ranouf this looks like a different case - "must be reducible node" exception appears for lot of cases when we fail to correctly translate the query. Can you file a new issue, so we can track/triage is better? |
Using EF Core version: 1RC2
Given this model:
A simple query like this works fine:
context.Set<Foo>().Where(x => x.Bars.Any()).ToList();
Similarly, this query will also work (albeit it using multiple queries):
context.Fees.Select(x => x.Foo).Where(x => x.Bars.Any()).ToList();
However this query fails with a 'must be reducible node' exception (see stacktrace below):
context.Fees.SelectMany(x => x.Foos).Where(x => x.Bars.Any()).ToList();
Exception message:
must be reducible node
Stack trace:
The text was updated successfully, but these errors were encountered: