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
Breaking changes note on new single-query behavior and cartesian explosion #1769
Now that we generate a single SQL query for a LINQ query, users will start running into the cartesian explosion problem when joining multiple tables (e.g. dotnet/efcore#18022). We should add a section in the loading related data page with a code sample.
So the docs will essentially have an example of a query which generates dozens or hundreds of joins, with a proposed alternative style of structuring such a query?
In my case, my project is not very mature so it wouldn't be a problem to convert my one query which does this, but I imagine others who have mature projects would be left with a choice, either don't upgrade, or refactor dozens of queries.
Is it possible for there to be an opt out of single linq query so we can have our cake, and at least partially eat it?
SELECT
*,
(select * from Posts where Posts.BlogId = Blogs.BlogId FOR XML AUTO),
(select * from Post2s where Post2s.BlogId = Blogs.BlogId FOR XML AUTO)
FROM Blogs
Note that this is better than EF6 since you require no sort or memory grant.
changed the title [-]Discuss cartesian explosion and discuss workarounds[/-][+]Breaking changes note on new single-query behavior and cartesian explosion[/+]on Oct 2, 2019
Activity
CanuckAussieKev commentedon Sep 24, 2019
So the docs will essentially have an example of a query which generates dozens or hundreds of joins, with a proposed alternative style of structuring such a query?
In my case, my project is not very mature so it wouldn't be a problem to convert my one query which does this, but I imagine others who have mature projects would be left with a choice, either don't upgrade, or refactor dozens of queries.
Is it possible for there to be an opt out of single linq query so we can have our cake, and at least partially eat it?
brunom commentedon Sep 26, 2019
Why can't you use Nested FOR XML Queries?
would become
Note that this is better than EF6 since you require no sort or memory grant.
Doc section and breaking change note on cartesian explosion
[-]Discuss cartesian explosion and discuss workarounds[/-][+]Breaking changes note on new single-query behavior and cartesian explosion[/+]Breaking change note on cartesian explosion
Breaking change note on cartesian explosion