Skip to content

Support auditing and history for complex properties#24767

Merged
EngincanV merged 4 commits intodevfrom
ComplexProperty
Jan 29, 2026
Merged

Support auditing and history for complex properties#24767
EngincanV merged 4 commits intodevfrom
ComplexProperty

Conversation

@maliming
Copy link
Member

Resolve #24764

Copilot AI review requested due to automatic review settings January 28, 2026 13:12
@maliming maliming added this to the 10.2-preview milestone Jan 28, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for EF Core Complex Properties in ABP's auditing and entity history tracking. Previously, complex properties were not included in change detection, causing entity history records to be missing and modification audit properties (like ModifierId) not to be set when only complex property values changed.

Changes:

  • Extended AbpDbContext to include complex property entries when checking for modifications
  • Added complex property tracking to EntityHistoryHelper for property change history
  • Added test entities with complex properties and comprehensive test coverage for auditing behavior

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs Added GetAllPropertyEntries method to combine regular and complex properties; updated modification tracking to use this method
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs Added iteration through complex properties for entity history; changed method signature to accept IReadOnlyPropertyBase for broader compatibility
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs Added PersonContactInformation complex property with various DisableAuditing attributes for testing
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs Initialized test data with complex property values
framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs Configured complex property mapping for Person.ContactInformation
framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/TestMigrationsDbContext.cs Configured complex property mapping for migrations context
framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Auditing/Auditing_Tests.cs Added comprehensive tests for complex property auditing behavior with DisableAuditing attributes
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs Added test for entity history tracking of complex property changes
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithComplexProperty.cs Created test entity with complex property for auditing tests
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs Configured complex property mapping for auditing tests
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs Registered complex property entity for entity history tracking

…complex property changes and updating related tests
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

@maliming maliming requested review from Copilot and removed request for Copilot January 29, 2026 03:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@EngincanV EngincanV merged commit 0bac6c6 into dev Jan 29, 2026
8 of 11 checks passed
@EngincanV EngincanV deleted the ComplexProperty branch January 29, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EF Core Complex Properties ignored in change tracking (Entity History & ModifierId)

4 participants