MapsterMapper / MapsterMapper/Mapster
Properties do not map properly
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.2k
- Forks
- 410
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
I have a class `A` that has a `DateTime` property, and class `B` that has a `long` property.
Both properties have the same name.
I've setup the rule for type `DateTime` converting to `long` in a config `C1` which implements `IRegister` interface.
And of course a config `C2` for `A` converting to `B`
But when I map from `A` to `B`, that `DateTime` property will always 0, unless I set the mapping rule in config `C2`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the mapping with classes A and B, configurations C1 and C2, and the DateTime-to-long rule; done means the property maps correctly when the conversion is registered only in C1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100