Skip to content

Conversation

@AndriySvyryd
Copy link
Member

Fixes #35025

Comment on lines 2661 to 2662
var complexTypeTable = complexProperty.ComplexType.GetViewOrTableMappings().SingleOrDefault(
ctm => containerProjection.TableMap.ContainsKey(ctm.Table))?.Table;
Copy link
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
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
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
Copy link
Member

roji commented Dec 20, 2025

Superceded by #37410

@roji roji closed this Dec 20, 2025
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)

4 participants