EFCore 7 - SqlServer - Git test TPTTableSplittingSqlServerTest.Can_query_shared is generating different foreign key constraint when compared to EFCore 6 #29564
When looking at the entity classes and relationship defined for the entities, I don't see any difference b/w EFCore 6 and EFCore 7.
Here is what I see OnModelCreating for the entity.
I am wandering why the create table script has now changed in EFCore 7.
Is this an issue or is this expected?
If this is expected, what does it mean having 2 foreign keys constraint for same column?
Please could someone clarify.
EF Core version: 7.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET 6.0
Operating system: Windows 10
IDE: Visual Studio 2022 17.2.6
Git test TPTTableSplittingSqlServerTest.Can_query_shared is generating following create table script for table 'CombustionEngines'.
Where it is having 2 foreign key constraint for column
VehicleName
, both referencingPoweredVehicles.Name
.While in EFCore 6 the same test used to generate following create table script.
When looking at the entity classes and relationship defined for the entities, I don't see any difference b/w EFCore 6 and EFCore 7. Here is what I see OnModelCreating for the entity.
I am wandering why the create table script has now changed in EFCore 7. Is this an issue or is this expected? If this is expected, what does it mean having 2 foreign keys constraint for same column? Please could someone clarify.
EF Core version: 7.0.0 Database provider: Microsoft.EntityFrameworkCore.SqlServer Target framework: NET 6.0 Operating system: Windows 10 IDE: Visual Studio 2022 17.2.6