Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MapsterMapper#370 where capitalized abbreviations are not mapped … #590

Merged
merged 1 commit into from
May 29, 2023

Conversation

joshslark
Copy link
Contributor

@joshslark joshslark commented May 21, 2023

…properly between records

This PR fixes an issue where when you have a destination member that isn't in pascal case for a record, then it will ignore the mapping. (#370)

In ValueAccessingStrategy.cs, the custom resolver destination member is compared for equality against the ParameterModel destination member. However, in ParameterModel, it modifies the destination member to force it to be Pascal Case. I couldn't figure out exactly why we do this, but it breaks a number of tests if you change it.

The only solution I could find that avoids breaking any tests is to compare the two destination members ignoring case. Even if this isn't the correct solution, hopefully this will help someone more familiar create a better solution.

@RobKoda
Copy link

RobKoda commented Sep 19, 2023

Hello!

Any idea on when this will be published? Even as a prerelease nuget?
Latest prerelease (pre06) seems to be 7 months old, while this fix was merged 4 months ago.

@andrerav
Copy link
Contributor

Hi @RobKoda, I released 7.4.0 yesterday. Apologies for the delay, it's been a busy summer :)

@elmondir
Copy link

this still happen with property Name FrName

@mehmetozkaya
Copy link

Error still continue and not mapped _ properties i.e. Address_FirstName in 7.4.0 version.

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.

None yet

5 participants