Skip to content

Allow specifying different column facets per table in TPT, TPC or entity splitting #27970

Description

@AndriySvyryd

Split off from #19811

modelBuilder.Entity<Customer>().ToTable("Customer");
modelBuilder.Entity<SpecialCustomer>().ToTable("SpecialCustomer", tb =>
{
    tb.Property(c => c.Id)
        .HasDefaultValue("1")
        .HasDefaultConstrainName("blah")
        .HasDefaultValueSql("newid()")
        .HasComputedColumnSql("1")
        .HasConversion<string>()
        .HasColumnType("nvarchar(100)")
        .IsRequired(false)
        .HasMaxLength(100)
        .IsUnicode(false)
        .HasPrecision(1, 2)
        .HasCollation("Latin1_General_BIN2");
});

Activity

  1. added this to the Backlog milestone on May 10, 2022
  2. maximcus commented on Jul 24, 2023

    @maximcus

    @AndriySvyryd @ajcvickers I'm interested in #24685. Is this planned for EF Core 8 release by any chance?

  3. AndriySvyryd commented on Jul 25, 2023

    @AndriySvyryd
    MemberAuthor

    @maximcus No. Vote (👍) for both issues so we consider them for future releases

  4. maumar commented on May 7, 2025

    @maumar
    Contributor

    This is also a problem for explicit constraint names (e.g. key constraint, default constraint)

  5. kescherCode commented on May 15, 2025

    @kescherCode

    This issue is making itself quite apparent when you want to set a database computed column on a TPC entity, but not others of the same inherited type.

  6. added theissue type on Jun 15, 2025
  7. Ukkie007 commented on Jun 16, 2025

    @Ukkie007

    Still using EF 6 because of this lack.

  8. roji commented on Jun 16, 2025

    @roji
    Member

    @Ukkie007 EF 6 is out of support. Also, AFAIK this isn't something that was supported in EF 6, so I'm not sure how keeping on that version helps.

  9. Ukkie007 commented on Jun 18, 2025

    @Ukkie007

    I need Split mappings in a TPH scenario. As this case "Spilt mappings are not supported for hierarchies #34190" is closed being a duplicate, I repeat my question here.
    I am aware that EF6 is not supported anymore, but I don't see any alternative. More > 200 databases in production.

  10. roji commented on Jun 18, 2025

    @roji
    Member

    Ah sorry, you meant non-core EF6 before, rather than EF Core 6, my bad. FWIW non-core EF6 is technically not out of support, but is no longer being evolved (so would receive critical security fixes). Added ef6-parity label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions