Two model classes in the same hierarchy with identical field names causes exception #7536
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Using EF Core 1.1.0, there seems to be an error with two classes included in a model with an inheritance relationship, and which both contain fields with the same name:
Trying to use this model in any way triggers the following exception:
The exception gets thrown from this line:
and the reason is that
GetRuntimeFields()
returns all the fields from the entire hierarchy, and theToDictionary()
bombs since we have the same name twice.FYI, this scenario was triggered by including a Code Contract invariant method on both parent and child - CC's rewriter apparently rewrites the classes to add a field with the same name.
The text was updated successfully, but these errors were encountered: