You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to configure TPC mapping with EF Core 7.0.2 and seem to encounter the following bug:
When applying .UseTpcMappingStrategy() to the entity, which is an abstract class, all defined children ignore previously specified modelBuilder.HasDefaultSchema().
Although I only checked with PostgreSQL, I've tried to debug this and I'm pretty sure it should be reproducible with any DBMS.
The result of this code should be the following structure, where SomeChildEntity is created in database's default schema instead of specified "test_schema", while OtherEntity is created in expected schema
Include provider and version information
EF Core version: 7.0.2
Database provider: Npgsql.EntityFrameworkCore.PostgreSQL
Target framework: net7.0
The text was updated successfully, but these errors were encountered:
roji
changed the title
HasDefaultSchema is ignored for tables created with TCP mapping
HasDefaultSchema is ignored for tables created with TPC mapping
Jan 12, 2023
File a bug
I've been trying to configure TPC mapping with EF Core 7.0.2 and seem to encounter the following bug:
When applying
.UseTpcMappingStrategy()
to the entity, which is an abstract class, all defined children ignore previously specifiedmodelBuilder.HasDefaultSchema()
.Although I only checked with PostgreSQL, I've tried to debug this and I'm pretty sure it should be reproducible with any DBMS.
Minimal repro code
Then run migration
The result of this code should be the following structure, where
SomeChildEntity
is created in database's default schema instead of specified "test_schema", whileOtherEntity
is created in expected schemaInclude provider and version information
EF Core version: 7.0.2
Database provider: Npgsql.EntityFrameworkCore.PostgreSQL
Target framework: net7.0
The text was updated successfully, but these errors were encountered: