Open CasperWSchmidt opened 12 months ago
Agreed the wording could be better here. The last table is specifically what happens when the dependents are not loaded. You will get an exception in this case, unless the database is configured for cascades outside of EF Core.
I get that the table is specifically for not loaded but as I said, how does it make sense to default this case to ClientSetNull
when this will throw an exception? I guess the default should be SetNull
no?
Also please clarify how point 1 and 3 is not in conflict :)
@CasperWSchmidt SetNull
would be a wonderful default--but SQL Server support for it is very limited. The point here is that you must load dependents otherwise this scenario will always throw.
Hi
According to the last table on the page,
ClientSetNull
throws an exception, but according to the text right below,ClientSetNull
is the default. How does it make sense to have a default value that results in exceptions being thrown? I don't know if the table or the text is wrong, but surely the default results in the FK to be set to null somehow 💯Also the notes disagree with itself:
Point 1 says dependents must be loaded while point 3 says configuring cascading is okay even when dependents is not loaded?
Document Details
⚠Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.