Browse Source
Merge pull request #19093 from abpframework/ValueGenerated.OnAdd
`PublishEntityEvent` for entities with default value.
pull/19112/head
liangshiwei
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
|
|
|
@ -316,7 +316,7 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext, |
|
|
|
break; |
|
|
|
case EntityState.Modified: |
|
|
|
ApplyAbpConceptsForModifiedEntity(entry); |
|
|
|
if (entry.Properties.Any(x => x.IsModified && x.Metadata.ValueGenerated == ValueGenerated.Never)) |
|
|
|
if (entry.Properties.Any(x => x.IsModified && (x.Metadata.ValueGenerated == ValueGenerated.Never || x.Metadata.ValueGenerated == ValueGenerated.OnAdd))) |
|
|
|
{ |
|
|
|
if (entry.Entity is ISoftDelete && entry.Entity.As<ISoftDelete>().IsDeleted) |
|
|
|
{ |
|
|
|
|