Skip to content

Commit 27df490

Browse files
author
Bart Koelman
committed
Fixed detection of implicit many-to-many join entity in EF Core 6
1 parent 8a10143 commit 27df490

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/JsonApiDotNetCore/Configuration/ResourceGraphBuilder.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using JsonApiDotNetCore.Resources.Annotations;
99
using Microsoft.EntityFrameworkCore;
1010
using Microsoft.EntityFrameworkCore.Metadata;
11-
using Microsoft.EntityFrameworkCore.Metadata.Internal;
1211
using Microsoft.Extensions.Logging;
1312

1413
namespace JsonApiDotNetCore.Configuration
@@ -81,9 +80,7 @@ public ResourceGraphBuilder Add(DbContext dbContext)
8180

8281
private static bool IsImplicitManyToManyJoinEntity(IEntityType entityType)
8382
{
84-
#pragma warning disable EF1001 // Internal Entity Framework Core API usage.
85-
return entityType is EntityType { IsImplicitlyCreatedJoinEntityType: true };
86-
#pragma warning restore EF1001 // Internal Entity Framework Core API usage.
83+
return entityType.IsPropertyBag && entityType.HasSharedClrType;
8784
}
8885

8986
/// <summary>

0 commit comments

Comments
 (0)