-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Explicit configuration of a TPT relationship causes the database constraint not to be created #29169
Labels
Milestone
Comments
Note from triage: waiting for @AndriySvyryd |
The above configuration promotes the FK to modelBuilder
.Entity<FeaturedPost>()
.HasOne<Post>()
.WithOne()
.HasForeignKey<FeaturedPost>(e => e.Id)
.OnDelete(DeleteBehavior.ClientCascade); |
ajcvickers
added a commit
to dotnet/EntityFramework.Docs
that referenced
this issue
Oct 6, 2022
ajcvickers
added a commit
to dotnet/EntityFramework.Docs
that referenced
this issue
Oct 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the simple TPT model:
This results in the following tables:
I want to change the cascade behavior for the FK constraint between the two tables, so I do this:
Now the FK constraint disappears entirely!
Full code:
The text was updated successfully, but these errors were encountered: