Browse Source
Skip if `navigationEntry.CurrentValue` is `null`.
pull/19523/head
maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
6 additions and
0 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ChangeTrackers/AbpEfCoreNavigationHelper.cs
|
|
@ -50,6 +50,12 @@ public class AbpEfCoreNavigationHelper : ITransientDependency |
|
|
var index = 0; |
|
|
var index = 0; |
|
|
foreach (var navigationEntry in entityEntry.Navigations.Where(navigation => !navigation.IsModified)) |
|
|
foreach (var navigationEntry in entityEntry.Navigations.Where(navigation => !navigation.IsModified)) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (!navigationEntry.IsLoaded && navigationEntry.CurrentValue == null) |
|
|
|
|
|
{ |
|
|
|
|
|
index++; |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var currentValue = navigationEntry.CurrentValue; |
|
|
var currentValue = navigationEntry.CurrentValue; |
|
|
if (navigationEntry.CurrentValue is ICollection collection) |
|
|
if (navigationEntry.CurrentValue is ICollection collection) |
|
|
{ |
|
|
{ |
|
|
|