Skip to content

fix: apply EmptyCollectionIfNull to record constructor args (#943)#973

Open
leno23 wants to merge 2 commits into
MapsterMapper:developmentfrom
leno23:fix/empty-collection-transform-ctor-943-dev
Open

fix: apply EmptyCollectionIfNull to record constructor args (#943)#973
leno23 wants to merge 2 commits into
MapsterMapper:developmentfrom
leno23:fix/empty-collection-transform-ctor-943-dev

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 25, 2026

Summary

  • Apply EmptyCollectionIfNull (and other destination transforms) to record/class constructor arguments when null sources would otherwise skip transforms.
  • Skip destination transforms when a member has an explicit .Map() resolver so explicit null mappings are preserved.

Fixes #943
Relates to #952 (ctor-parameter path; property path covered by #966)

Test plan

wuyangfan and others added 2 commits May 25, 2026 15:52
…apper#943)

Apply destination transforms when null-propagation is skipped for ctor
parameters and when building record constructor arguments.

Co-authored-by: Cursor <cursoragent@cursor.com>
…erMapper#943, MapsterMapper#952)

Do not apply EmptyCollectionIfNull when a member has an explicit Map
resolver, including record constructor parameters.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant