-
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
Create table mappings for complex types in TPC #35314
base: release/9.0-staging
Are you sure you want to change the base?
Conversation
var complexTypeTable = complexProperty.ComplexType.GetViewOrTableMappings().SingleOrDefault( | ||
ctm => containerProjection.TableMap.ContainsKey(ctm.Table))?.Table; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roji There can now be more than one mapping per complex type when all types in TPC hierarchy are selected. I think this code needs significant updates to support this. Do you see a simple/safe way to make it work for 9.0.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, makes sense... I'd have to look deeper, but is PR as-is sufficient to make it work? If so it doesn't necessarily seem to bad for a patch?
BTW if things do get complicated here and we only fix this for 10 (as part of the big complex type push), I don't think it's the end of the world either...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, makes sense... I'd have to look deeper, but is PR as-is sufficient to make it work? If so it doesn't necessarily seem to bad for a patch?
This PR changes the exception from "no elements" to "more than one element"
|
||
[ConditionalTheory] | ||
[MemberData(nameof(IsAsyncData))] | ||
public virtual async Task Select_base_with_ComplexTypes_in_TPC(bool async) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's AdHocComplexTypeQueryTestBase which is a bit more targeted... In any case, hopefully as we refactor our tests this wouldn't have to be ad-hoc any more.
Fixes #35025