Fix ExtraProperties filter bypass in Mapperly single-parameter Map#25486
Merged
salihozkara merged 1 commit intoMay 28, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Mapperly single-parameter object mapping so [MapExtraProperties] filtering is applied correctly and unwanted ExtraProperties are not retained from Mapperly’s initial copy.
Changes:
- Starts single-parameter
Map/ReverseMapextra-property merging from an empty dictionary. - Adds forward, reverse, and dictionary-reference tests for the corrected behavior.
- Registers new extensible reverse-map test types and properties.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/MapperlyAutoObjectMappingProvider.cs |
Updates single-parameter Mapperly extra-property handling to avoid copied source extras bypassing filters. |
framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/SampleClasses/MapperlyMappers.cs |
Adds extensible reverse-map test types and mapper. |
framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/MapperlyTestModule.cs |
Registers extension properties used by the new reverse-map tests. |
framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/ExtraProperties_Dictionary_Reference_Tests.cs |
Adds coverage for avoiding shared ExtraProperties references in single-parameter mapping. |
framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/AbpReverseMapperly_Tests.cs |
Adds reverse single-parameter filtering coverage. |
framework/test/Volo.Abp.Mapperly.Tests/Mapperly/AbpAutoMapperExtensibleDtoExtensions_Tests.cs |
Adds forward single-parameter extra-property filtering and regular-property mapping coverage. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## rel-10.4 #25486 +/- ##
============================================
- Coverage 49.42% 49.41% -0.01%
============================================
Files 3670 3670
Lines 123599 123599
Branches 9453 9453
============================================
- Hits 61083 61080 -3
Misses 60682 60682
- Partials 1834 1837 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
salihozkara
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Single-parameter
IObjectMapper.Map<TSource, TDestination>(source)was bypassing[MapExtraProperties]filtering since #23694, because the destination snapshot was taken after Mapperly copiedsource.ExtraPropertiesinto the new destination. Restore the original behavior by startingMapExtraPropertiesfrom an empty dictionary for both mapper and reverseMapper single-parameter paths.Resolves #25485.