yigityus / orika

Automatically exported from code.google.com/p/orika
0 stars 0 forks source link

BidirectionalConverter conversion between equal types (String,String) #165

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is a BidirectionalConverter only meant to be used for conversion between 
different types? I have a case where i need to map a countrycode (String type) 
in my DTO to a countryname in my domain object (DO). This functionality is 
needed for more DTO<->DO mappings.

I have implemented a custom BidirectionalConverter and mapping to the DO works, 
but when mapping from DO to DTO, the convertTo method is called.

Is this possible or should this type of mapping be done in a CustomMapper?

Regards Rob  

Original issue reported on code.google.com by rob.sess...@gmail.com on 13 Jun 2014 at 2:56