- priority: 5 --> 9
Hi'
I have a case that map between entity (JPA) to DTO object,
I want to decide if to do a mapping to a specific field.
I want to check the LAZY option:
In case we defined the field as LAZY - do not map this field.
I guess that the place to insert code that retrieve boolean is
under MappingProcessor -> mapField -> line ~253
after:
if (fieldMapping instanceof ExcludeFieldMap) {
return;
}
inserting something like:
if (customFieldMapper.skipMapField(srcObj, destObj, srcFieldValue, fieldMapping.getClassMap(), fieldMapping)) {
return;
}
add the method: boolean skipMapField(Object source, Object destination, Object sourceFieldValue, ClassMap classMap, FieldMap fieldMapping);
and add this method into the