Skip to content

Migrations: CHECK Required Columns on TPH Derived Types #2595

New issue

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

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

Already on GitHub? # to your account

Open
Tracked by #22953
bricelam opened this issue Jul 10, 2015 · 3 comments
Open
Tracked by #22953

Migrations: CHECK Required Columns on TPH Derived Types #2595

bricelam opened this issue Jul 10, 2015 · 3 comments

Comments

@bricelam
Copy link
Contributor

For required properties on derived types, we could add a CHECK constraint to ensure it's NOT NULL when the discriminator is one that type or one of it's derived types.

@rowanmiller rowanmiller added this to the Backlog milestone Jul 10, 2015
@rowanmiller rowanmiller added the help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. label Jul 10, 2015
@divega divega added good first issue This issue should be relatively straightforward to fix. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. and removed help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. good first issue This issue should be relatively straightforward to fix. labels May 31, 2019
@ajcvickers ajcvickers added good first issue This issue should be relatively straightforward to fix. and removed help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. labels Aug 5, 2019
@roji roji removed this from the Backlog milestone Sep 14, 2020
@roji
Copy link
Member

roji commented Sep 14, 2020

Clearing milestone to determine whether we want this to be in EF Core or in EFCore.CheckConstraints (efcore/EFCore.CheckConstraints#6)

@bricelam
Copy link
Contributor Author

Also useful for optional dependents using table splitting

@bricelam
Copy link
Contributor Author

bricelam commented Nov 4, 2020

A Stack Overflow question about this: EF Core saves null value of required property

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

7 participants