Skip to content

fix: skip destination transforms for explicit member maps (#952)#960

Closed
leno23 wants to merge 1 commit into
MapsterMapper:masterfrom
leno23:fix/explicit-null-map-952
Closed

fix: skip destination transforms for explicit member maps (#952)#960
leno23 wants to merge 1 commit into
MapsterMapper:masterfrom
leno23:fix/explicit-null-map-952

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 25, 2026

Summary

  • Skip global DestinationTransform rules when a member has an explicit .Map(...) resolver
  • Add regression test for EmptyCollectionIfNull with an explicit null mapping

Fixes #952

Test plan

  • CI passes
  • Existing destination transform tests still pass
  • Explicit .Map(..., _ => null) keeps null instead of empty collection

Made with Cursor

Explicit .Map(...) configuration should take precedence over global
DestinationTransform rules such as EmptyCollectionIfNull.

Fixes MapsterMapper#952

Co-authored-by: Cursor <cursoragent@cursor.com>
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 25, 2026

Closing in favor of the development-targeting PR that supersedes this (master is stale for active Mapster work). See the corresponding -dev branch PR on base development.

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 25, 2026

Superseded by development-targeting PR

@leno23 leno23 closed this May 25, 2026
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.

DestinationTransform.EmptyCollectionIfNull overrides explicit null mapping

1 participant