NET 5.0 RC1 Table-per-type (TPT): DbUpdateException in SaveChanges when inserting objects with Foreign Key relationship #22577
Labels
area-save-changes
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
Servicing-approved
type-bug
Milestone
Trying out the new Table-per-type (TPT) mapping feature, I get the following DbUpdateException with a FK-Error in SaveChanges, when I:
The exception occurs in 5.0.0-rc.1.20451.13 and 6.0.0-alpha.1.20465.1.
All works fine with 5.0.0-preview.8.20407.4!
(Removing the usage of the TPT-Feature, also makes the example work.)
Exception:
Steps to reproduce:
Further technical details
EF Core version: 5.0.0-rc.1.20451.13 (doesn't work), 6.0.0-alpha.1.20465.1 (doesn't work), 5.0.0-preview.8.20407.4 (works fine!)
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET Core 3.1.8
Operating system: Windows 10 2004
SQL Server 15.0.4063.15
IDE: Visual Studio 2019 16.7.3
The text was updated successfully, but these errors were encountered: