-
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
EF Core converts Linq Union to SQL with error #23676
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
Comments
Issues here, the table graph is lost after union is generated plus the identifier for collection projections are not found and should be updated to use the Movie identifiers |
smitpatel
added
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
and removed
blocked
labels
Mar 23, 2021
smitpatel
added a commit
that referenced
this issue
Mar 24, 2021
- Don't apply Include on entities with Include already applied - Update table references when pushing down select into left for set operation - Update identifiers after applying set operation if the projection removed exiting identifiers - Update SQL references in pending collection during push down Fix for the repro in #17337 Resolves #18738 Resolves #19763 Resolves #19947 Resolves #20813 Resolves #21026 Resolves #22222 Resolves #23676 Resolves #23720
smitpatel
added a commit
that referenced
this issue
Mar 24, 2021
- Don't apply Include on entities with Include already applied - Update table references when pushing down select into left for set operation - Update identifiers after applying set operation if the projection removed exiting identifiers - Update SQL references in pending collection during push down Fix for the repro in #17337 Resolves #18738 Resolves #19763 Resolves #19947 Resolves #20813 Resolves #21026 Resolves #22222 Resolves #23676 Resolves #23720 Resolves #24216
smitpatel
added a commit
that referenced
this issue
Mar 24, 2021
- Don't apply Include on entities with Include already applied - Update table references when pushing down select into left for set operation - Update identifiers after applying set operation if the projection removed exiting identifiers - Update SQL references in pending collection during push down Fix for the repro in #17337 Resolves #18738 Resolves #19763 Resolves #19947 Resolves #20813 Resolves #21026 Resolves #22222 Resolves #23676 Resolves #23720 Resolves #24216
smitpatel
added a commit
that referenced
this issue
Mar 25, 2021
- Don't apply Include on entities with Include already applied - Update table references when pushing down select into left for set operation - Update identifiers after applying set operation if the projection removed exiting identifiers - Update SQL references in pending collection during push down Fix for the repro in #17337 Resolves #18738 Resolves #19763 Resolves #19947 Resolves #20813 Resolves #21026 Resolves #22222 Resolves #23676 Resolves #23720 Resolves #24216
smitpatel
added a commit
that referenced
this issue
Mar 25, 2021
- Don't apply Include on entities with Include already applied - Update table references when pushing down select into left for set operation - Update identifiers after applying set operation if the projection removed exiting identifiers - Update SQL references in pending collection during push down Fix for the repro in #17337 Resolves #18738 Resolves #19763 Resolves #19947 Resolves #20813 Resolves #21026 Resolves #22222 Resolves #23676 Resolves #23720 Resolves #24216
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
LINQ Union to SQL converting problem
Problem description:
The problem is EF generates wrong query with extra columns PosterUrl and Rating for wrong table. You can see the evidence in output.
I have a Persons table
Person connected one-to-one with Actor and Director
Actor and Director connected many-to-many with Movies
The task is to get unique movies of Person as Director and Actor
Database schema (for understanding)
Link
Entities
Not working query
Output
Working Ugly Query
I had tried to figure out the problem and founded an ugly solution
Correct Output
EF Core version: 5.0
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: (e.g. .NET 3.1)
Operating system: Win 10
IDE: (e.g. Visual Studio 2019 16.8.3)
The text was updated successfully, but these errors were encountered: