-
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
2.1 regression: "variable referenced from scope '', but it is not defined" exception in GroupBy query translation #11904
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
regression
type-bug
Milestone
Comments
JesperTreetop
changed the title
2.1 regression: variable referenced from scope '', but it is not defined exception in groupby
2.1 regression: "variable referenced from scope '', but it is not defined" exception in GroupBy query translation
May 4, 2018
Passing over to @maumar since he is working on a fix. |
maumar
added a commit
that referenced
this issue
May 5, 2018
…ut it is not defined" exception in GroupBy query translation Problem was that we were not correctly handling scenarios where multiple groupbys are present: - if combined with Include, we would try to create orderings based on grouping keys for each group by. This is incorrect because all group keys apart from the innermost are out of scope of the inner query model (where we attempted to add them) - if combined with aggregate we would try to translate into group-aggregate pattern and fail. Fix is to only add ordering for the first grouping in case of include (includes are ignored for multi-groupby scenarios, so there is no risk of collection misalignment) and don't try to convert queries into group-aggregate pattern if multiple groupbys are present in the query.
maumar
added a commit
that referenced
this issue
May 5, 2018
…ut it is not defined" exception in GroupBy query translation Problem was that we were not correctly handling scenarios where multiple groupbys are present: - if combined with Include, we would try to create orderings based on grouping keys for each group by. This is incorrect because all group keys apart from the innermost are out of scope of the inner query model (where we attempted to add them) - if combined with aggregate we would try to translate into group-aggregate pattern and fail. Fix is to only add ordering for the first grouping in case of include (includes are ignored for multi-groupby scenarios, so there is no risk of collection misalignment) and don't try to convert queries into group-aggregate pattern if multiple groupbys are present in the query.
fixed in af08612 |
maumar
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
May 5, 2018
Impressively expedient. Will this make it in in time for the rc? |
@JesperTreetop RC1 has already locked down. This fix will be included in the RTM release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
regression
type-bug
A particular form of GroupBy seems to not work with 2.1 yet worked flawlessly in 2.0.
Steps to reproduce
This example .NET Core console app project has a single package reference to
Microsoft.EntityFrameworkCore.Sqlite
. I encounter the problem with version2.1.0-preview2-final
, but not with2.0.2
.Further technical details
EF Core version: 2.1.0-preview2-final
Database Provider: Microsoft.EntityFrameworkCore.Sqlite in the regression code example provided above but seen in Microsoft.EntityFrameworkCore.SqlServer in the real project
Operating system: Windows 10 (Version 1709)
IDE: Visual Studio 2017 15.7 Preview 5
The text was updated successfully, but these errors were encountered: