Hi,
I was using EF5 and decided to switch to EF6.
If you run the attached project, you will find that the TPT inheritance is not properly applied to the database, but only for foreign keys. In this example the Department_Id foreign key is moved up to the Person table instead of being in the Employee table, while the HiredDate field remains in the Employee table.
Removing the Clients property from the DB context, or simply reverting to EF5 restores the proper behavior.
You need to add the EF6 rc1 package to the attached project in order for it to run and to reproduce the bug. It uses localdb v11.0 as its database.
Comments: Note that if one replaces ``` public DbSet<User> Users { get; set; } ``` with ``` public DbSet<Person> People { get; set; } ``` on EF5, migrating is a no-op (foreign key is placed on Persons table from the start)
I was using EF5 and decided to switch to EF6.
If you run the attached project, you will find that the TPT inheritance is not properly applied to the database, but only for foreign keys. In this example the Department_Id foreign key is moved up to the Person table instead of being in the Employee table, while the HiredDate field remains in the Employee table.
Removing the Clients property from the DB context, or simply reverting to EF5 restores the proper behavior.
You need to add the EF6 rc1 package to the attached project in order for it to run and to reproduce the bug. It uses localdb v11.0 as its database.
Comments: Note that if one replaces ``` public DbSet<User> Users { get; set; } ``` with ``` public DbSet<Person> People { get; set; } ``` on EF5, migrating is a no-op (foreign key is placed on Persons table from the start)