Browse Source
Fix IsOnlyForeignKeysModified logic in AbpDbContext
pull/24104/head
maliming
3 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
1 additions and
1 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
|
|
|
@ -474,7 +474,7 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext, |
|
|
|
|
|
|
|
protected virtual bool IsOnlyForeignKeysModified(EntityEntry entry) |
|
|
|
{ |
|
|
|
return entry.Properties.All(x => x.IsModified && x.Metadata.IsForeignKey() && |
|
|
|
return entry.Properties.Where(x => x.IsModified).All(x => x.Metadata.IsForeignKey() && |
|
|
|
(x.CurrentValue == null || x.OriginalValue?.ToString() == x.CurrentValue?.ToString())); |
|
|
|
} |
|
|
|
|
|
|
|
|