Skip to content

Conversation

@maliming
Copy link
Member

Resolve #24441

Copilot AI review requested due to automatic review settings December 18, 2025 12:30
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 PR adds support for skipping auditing of navigation properties when they are decorated with the [DisableAuditing] attribute. This resolves issue #24441 by allowing developers to selectively disable audit logging for specific navigation properties while maintaining auditing for the parent entity.

Key Changes

  • Added attribute check in EntityHistoryHelper.GetPropertyChanges() to skip navigation properties marked with [DisableAuditing]
  • Created test entity with a navigation property marked with [DisableAuditing] to verify the functionality
  • Added unit test to ensure navigation property changes are not audited when the attribute is present

Reviewed changes

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

File Description
EntityHistoryHelper.cs Added check for DisableAuditingAttribute on navigation properties before recording property changes
AbpAuditingTestDbContext.cs Added DbSet for new test entity with DisableAuditing on navigation property
AppEntityWithNavigationsAndDisableAuditing.cs Created test entities to verify DisableAuditing behavior on navigation properties
Auditing_Tests.cs Added test case to verify navigation changes are skipped when DisableAuditing is applied

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maliming maliming added this to the 10.0-patch milestone Dec 18, 2025
@maliming maliming requested a review from EngincanV December 18, 2025 13:01
@EngincanV EngincanV merged commit a332f9d into rel-10.0 Dec 19, 2025
8 of 9 checks passed
@EngincanV EngincanV deleted the AppEntityWithNavigationsAndDisableAuditing branch December 19, 2025 06:17
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.

3 participants