orika-mapper / orika

Simpler, better and faster Java bean mapping framework
http://orika-mapper.github.io/orika-docs/
Apache License 2.0
1.29k stars 268 forks source link

OrikaBean Mapper - mapping issue #340

Open rajudevansh opened 4 years ago

rajudevansh commented 4 years ago

Hi,

I am currently facing issues with orikabeanmapper while mapping the properties from source to destination. In my local am unable to replicate the issue. I have restarted environment in debug mode and able to replicate the issue with following logs. This below issue is not coming consistently in the environment.

In the below logs, i can see only one difference with "ReversedMapper" and "GeneratedMapper".

Failure log:

[nio-8080-exec-9] ma.glasnost.orika.impl.MapperFacadeImpl : MappingStrategy resolved and cached: Inputs:[ sourceClass: sourceClass, sourceType: null, destinationType: destinationType] Resolved:[ strategy: InstantiateAndUseCustomMapperStrategy, sourceType: XX, destinationType: YY, mapper: ma.glasnost.orika.impl.ReversedMapper@5050e3e4, mapReverse?: false]

Success log:

MappingStrategy resolved and cached: Inputs:[ sourceClass: sourceClass, sourceType: null, destinationType: destinationType] Resolved:[ strategy: InstantiateAndUseCustomMapperStrategy, sourceType: XX, destinationType: XX, mapper: GeneratedMapper<XX, YY> {usedConverters: [], usedMappers: [], usedMapperFacades: [], usedTypes: [] }, mapReverse?: false]

Currently using orika-core-1.5.4 jar version.

Methods using : addMapper - for adding the custom mapper which is created map method - to map the properties.

Thanks Raju.C

rajudevansh commented 4 years ago

Can you please help me in resolving this issue?

rajudevansh commented 4 years ago

@elaatifi @matt-deboer Can you please help me in resolving the issue which am facing currently in Orika Bean Mapper.

stapetro commented 4 years ago

Hi @rajudevansh , can you please provide a test that reproduces the issue ?