Open rhanton opened 6 years ago
I will take a look why this commit disappeared.
It looks like #79 removes the commit by #46. But I think #79 won't break anything. Is there any problem you had met? Can you post your reproducible code and exception stacktrace? Thanks
I have the problem with BigDecimal as well. Source object has to fields cr = 12.45 and dr = 0 then after converting source object to dto, the dto has cr = 1 and dr = 0.
The unit test https://github.com/modelmapper/modelmapper/blob/master/core/src/test/java/org/modelmapper/bugs/GH46.java with our latest version of modelmapper, can you provide reproducible code? Thanks.
@chhsiao90 In my code has some methods like boolean isCr() and boolean isDr(), that's why it has strange behavior. After rename these methods, the converter works well again.
Okay, I will check why Cr / Dr matter. May I know what's your modelmapper's version? Can you try upgrade to our latest release version? thanks.
hi @quangthe , Can you provide the source code for your source/destination classes? Thanks.
Regarding the unit Test above it only works due to a configured map defining source.member to destination.member. But this is what I want to avoid (for a long list of members) while using ModelMapper (2.3.0) otherwise I can map my code by hand which is easier!
It's 2023 and I just faced this issue. The modelmapper is not mapping BigInteger
and BigDecimal
fields across entities. There is no exception or warning thrown beforehand.
version: 3.1.1
It looks like there was a fix for this in https://github.com/modelmapper/modelmapper/issues/46, but that code is not present in master anymore for some reason. Can someone work on merging that fix back in?