Skip to content

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.

5 participants