-
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
Group By Failure - Translation of 'Select' which contains grouping parameter without composition is not supported. #27426
Comments
@smitpatel Please link to the duplicate issue |
Duplicate of #19929 |
We are planning to support almost all of the EF6 queries in EF Core 7. |
@smitpatel @AndriySvyryd So essentially all of the issues mentioned under #19929 AND as you said almost all of the EF6 queries will be supported in EF Core 7. I am asking this again as we have multiple scenarios of group by queries and we need a clear direction whether to go about upgrading to EF Core 6/7 from EF6 at all or not. We can't change any existing LINQ queries written in EF6 which are by default server translatable, I do understand that if there are queries which are client evaluated then we need to have some kind of fix (preferably by implementing RelationalQueryTranslationPreprocessor) |
@smitpatel @AndriySvyryd Could you re-open this, as I have found one more group by related issue which needs clarification at least. Query:
Expression Tree:
Exception:
|
Duplicate of #26748 |
@AndriySvyryd assuming "ef6-parity" issues will be fixed as part of EF Core 7? |
@ankitmatrix08 Some of them. See #24106 for our plan |
This still remains true? I mean at least those queries which are getting translated to SQL in EF6 must work in EF Core 7. |
@ankitmatrix08 Most EF6 queries will be supported, though some might require to be client-evaluated. Due to the size of the domain we'll never be 100% sure that all EF6 queries work. |
@ankitmatrix08 We plan to support almost all queries. The exceptions will likely be for things like:
Our goal is to make the transition from EF6 as smooth as possible, but there are always other factors that play into the best thing to do in each individual case. |
Its still an issue in EF 8.0.8. Getting the same issue even after migrating. Below is my query System.InvalidOperationException: The LINQ expression 'DbSet() |
@DushyantSinghChouhan can you please open a new issue with a minimal, runnable code sample for this? |
Another set of Group By failure unfortunately: @smitpatel
The below LINQ query works perfectly fine in EF6 world where the whole query seems to be evaluated at the server (checked with SQL Profiler) but fails in EFCore6.
- SQL generated in EF6:
- Exception in EFCore 6:
- Expression Tree in EFCore 6
NOTE:
GroupBy
with auto-generated expression passed toSelect
throws an exception in RC1 and RC2 #26525 - doesn't seem to helpP.S. I have gone through probably all of the queries raised on Group By in this forum and it feels very confusing as to which one works and which one doesn't in which versions. A summary of the compatibility report would be very handy for all of the EFCore customers
EF Core version: 6.0.1
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6.0
Operating system: Win 10 Pro
IDE: Visual Studio 2022 v17.0.4
The text was updated successfully, but these errors were encountered: