typeMap.addMappings(
mapper -> mapper.<String>map(
src -> src.getLead().getBusiness().getName(), (dest, v) -> {dest.companyName= v;}));
if src.getLead().getBusiness()is null, will this be gracefully handled? If not, what options are included in modelmapper to deal
with this common scenario while deep mapping objects?
Regards,
Karsten
src -> {
if (src.getLead().getBusiness() != null) {
return src.getLead().getBusiness().getName();
}
return null;
}