Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPH: Support more discriminator conditions (NotNull etc.) #4722

Closed
jnm2 opened this issue Mar 8, 2016 · 3 comments
Closed

TPH: Support more discriminator conditions (NotNull etc.) #4722

jnm2 opened this issue Mar 8, 2016 · 3 comments

Comments

@jnm2
Copy link

jnm2 commented Mar 8, 2016

EF6 had the ability to use multiple discriminator properties to avoid the use of a dedicated discriminator column. You can set that it up so that if a subclass property is not null, that tells EF that the correct type is the subclass that owns the property.

It would be great to be able to go .HasDiscriminatorNotNull<TSubclass>(_ => _.SubclassProperty).

That's just a suggestion as far as what the API looks like, but we do need some way to be able to get rid of logically redundant discriminator columns to keep our tables clean.

@rowanmiller rowanmiller changed the title TPH ability to discriminate based off which property is non-null TPH: Support more disciminator conditions (NotNull etc.) Mar 8, 2016
@rowanmiller
Copy link
Contributor

Not currently supported but we do want to enable this (and other patterns) post v1.0.0

@rowanmiller rowanmiller added this to the Backlog milestone Mar 8, 2016
@jnm2 jnm2 changed the title TPH: Support more disciminator conditions (NotNull etc.) TPH: Support more discriminator conditions (NotNull etc.) Mar 8, 2016
@AndriySvyryd
Copy link
Member

Related: #10140

@ajcvickers
Copy link
Contributor

Closing in favor of #10140 which is basically a duplicate and has gathered more details.

@ajcvickers ajcvickers removed this from the Backlog milestone Apr 15, 2019
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants