Skip to content

Commit

Permalink
Add quirk mode for #23555
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriySvyryd committed Dec 8, 2020
1 parent ad08583 commit a41d4fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/EFCore/Metadata/Conventions/CascadeDeleteConvention.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;
Expand Down Expand Up @@ -57,6 +58,10 @@ public virtual void ProcessForeignKeyRequirednessChanged(
{
context.StopProcessingIfChanged(newRelationshipBuilder.Metadata.IsRequired);
}
else if (AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue23555", out var enabled) && enabled)
{
context.StopProcessing();
}
}

/// <summary>
Expand Down

0 comments on commit a41d4fe

Please sign in to comment.