Skip to content

Create table mappings for complex types in TPC - #35314

Closed
AndriySvyryd wants to merge 1 commit into
mainfrom
Issue35025
Closed

AndriySvyryd wants to merge 1 commit into
mainfrom
Issue35025

Conversation

@AndriySvyryd

Copy link
Copy Markdown
Member

Fixes #35025

Comment on lines +2661 to +2662
var complexTypeTable = complexProperty.ComplexType.GetViewOrTableMappings().SingleOrDefault(
ctm => containerProjection.TableMap.ContainsKey(ctm.Table))?.Table;

Copy link
Copy Markdown
Member Author

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?

Copy link
Copy Markdown
Member

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...

Copy link
Copy Markdown
Member Author

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"

@roji

roji commented Dec 20, 2025

Copy link
Copy Markdown
Member

Superceded by #37410

@roji roji closed this Dec 20, 2025
@AndriySvyryd
AndriySvyryd deleted the Issue35025 branch February 26, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support complex types on entity types participating in inheritance hierarchies (TPH/TPT/TPC)

3 participants