Skip to content

Commit 1535b64

Browse files
committed
Simplified check
1 parent f248625 commit 1535b64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonApiDotNetCore/Repositories/EntityFrameworkCoreRepository.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ private bool RequireLoadOfInverseRelationship(RelationshipAttribute relationship
625625
IEntityType? leftEntityType = _dbContext.Model.FindEntityType(relationship.LeftType.ClrType);
626626
INavigation? navigation = leftEntityType?.FindNavigation(relationship.Property.Name);
627627

628-
if (navigation != null && navigation.ForeignKey.DeclaringEntityType.ClrType == relationship.LeftType.ClrType)
628+
if (HasForeignKeyAtLeftSide(relationship, navigation))
629629
{
630630
return true;
631631
}

0 commit comments

Comments
 (0)