TPT: Relationships to derived type have FK to Key column on base table #21975
Labels
area-model-building
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
If I have an class in a one-to-one relationship with a TPT derived class, when I generate the migrations, the FK is to the Key column on the base class, rather than the derived class. I understand this will work (especially along with #21943), and that it makes sense because that property belongs to the base CLR class, but I would think it would be more ideal to have the FK to the Key column on the derived table.
Steps to reproduce
Generate a migration for the following context and models
Further technical details
EF Core version: 5.0.0-rc.1.20406.1
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET Core 3.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.6.5
The text was updated successfully, but these errors were encountered: