Skip to content

Commit

Permalink
Add quirk for #9704
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriySvyryd committed Sep 13, 2017
1 parent cbd2add commit fd0f2c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/EFCore/Metadata/Internal/InternalEntityTypeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,9 @@ private IEnumerable<ForeignKey> FindConflictingRelationships(
EntityType baseEntityType,
ConfigurationSource configurationSource)
{
var relationshipsToBeDetached = new HashSet<ForeignKey>();
var relationshipsToBeDetached = AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue9704", out var isEnabled) && isEnabled
? (ICollection<ForeignKey>)new List<ForeignKey>()
: new HashSet<ForeignKey>();
foreach (var navigation in Metadata.GetDerivedNavigationsInclusive())
{
if (!navigation.ForeignKey.GetConfigurationSource().Overrides(
Expand Down

0 comments on commit fd0f2c4

Please sign in to comment.