My DTO is having date field in String format. My entity is having date as LocalDate. Currently I am skipping it from map and then later manually explicitly setting it (Strin
I am currently using ModelMapper 2.3.5 and the accepted solution does not work with me when I do ModelMapper.validate()
for my mapping. See my related question.
I managed to get also validation working - surprisingly - by removing provider totally so only converter is used. So like:
modelmapper.addConverter(toStringDate);
modelmapper.getTypeMap(String.class, LocalDate.class); // no provider, maps ok with me still
modelmapper.validate();