Skip to content

Overlapping Inheritance and multiple Discriminator  #24997

@mogaozq

Description

@mogaozq

I have a database model that includes 3 types of user: SimpleUser, Secretary, Doctor.
Secretary and Doctor inherts SimpleUser entity.

I want the capability of a user having multiple types(or discriminator) at the same time. I'm using TPH approach to map my models to a table, but Descriminator value can't get multiple values.

So, my question is, is there any way to use multiple Descriminator value or I have to use TPT approach?

Include provider and version information

EF Core version:
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: (e.g. .NET 5.0)
Operating system:
IDE: (e.g. Visual Studio 2019 16.3)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions