-
Notifications
You must be signed in to change notification settings - Fork 381
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
How to configure ON UPDATE on Foreign Key constraint using Fluent API #807
Comments
There is no support for (Most of the time |
@ivanmem that requires EF-side support (tracked by dotnet/efcore#21563). You should be able to edit your migration and integrated the necessary DDL to add the ON UPDATE behavior (migration docs). |
Steps to reproduce
I have the following configuration for a foreign key relationship for one of my tables, I have configured the ON DELETE value:
However, I can't configure the ON UPDATE property in the same way, for illustration purposes:
The issue
It is possible to configure the ON DELETE value for a foreign key using the Fluent API, but it doesn't appear to be possible to configure the ON UPDATE value.
Is there a way to do this, or is there a reason that this isn't possible?
I could always add these in to the migration code that has been created, but I'm not sure whether that's a good thing to do...
Further technical details
MySQL version: 5.7.24
Operating system: Windows 10
Pomelo.EntityFrameworkCore.MySql version: 2.2.0
Microsoft.AspNetCore.App version:
Other details about my project setup:
The text was updated successfully, but these errors were encountered: