-
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
AsSplitQuery do not work with projections #22067
Comments
Bug: We don't split the LINQ queries but when applying SelectExpression we split it generating 2 fragments out of 1 SelectExpression causing invalid SQL. Splitting in LINQ is tracked by #21234 |
Design issue: In this case, we did not create a separate LINQ query for split scenario due to pending work in #21234
To solve this we either need to
Ideally when we fix #21234 we shouldn't need solution 2 above. Alternate proposal to throw exception right now, so user can move back to non-split scenario. |
Decided to block this scenario for now and remove exception once we fix #21234 |
This seems be still a problem in Preview 8 when using |
@MaikuMori - This issue is fixed in EF Core 5.0 RC1 release. |
Edit: Typo in the title: do not -> does not*
I can't get even the most simple projections to work with AsSplitQuery().
Steps to reproduce
I've tried with simple projections like
or
both yielding the following result:
A much more complex projection yields yet another exception
All 3 projections work just fine without AsSplitQuery. Of course it is not ideal to run them like that because of the performance implications of two collection includes in a single query.
Further technical details
EF Core version: 5.0.0-preview.7.20365.15
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET Core 3.1.301
Operating system: Windows
IDE: JetBrains Rider 2020.2
The text was updated successfully, but these errors were encountered: