A rather simple issue:
If I specify @BeanMapping(ignoreByDefault = true) and unmappedSourcePolicy != ReportingPolicy.IGNORE, non-mapped source parameters still cause an error. Arguably, this might be the correct behaviour, but I think it is not:
ignoreByDefault basically means "I will do everything manually". In my understanding, reporting policies are there to warn you about things the automatic matching is doing. In particular, if you have an unmappedTargetPolicy + an unmapped target property with ignoreByDefault = true, there are no errors (as, essentially, this throws an ignore = true on every target property). In the current state, this is asymmetric for the unmapped sources case, as @BeanMapping.ignoreUnmappedSourceProperties practically is the equivalent of @Mapping(ignore = true).
Proposal: ignoreByDefault also disables complaints about unmapped source properties :-)
This should be quite easy to implement, if you agree I can submit a PR.
A rather simple issue:
If I specify
@BeanMapping(ignoreByDefault = true)andunmappedSourcePolicy != ReportingPolicy.IGNORE, non-mapped source parameters still cause an error. Arguably, this might be the correct behaviour, but I think it is not:ignoreByDefaultbasically means "I will do everything manually". In my understanding, reporting policies are there to warn you about things the automatic matching is doing. In particular, if you have anunmappedTargetPolicy+ an unmapped target property withignoreByDefault = true, there are no errors (as, essentially, this throws anignore = trueon every target property). In the current state, this is asymmetric for the unmapped sources case, as@BeanMapping.ignoreUnmappedSourcePropertiespractically is the equivalent of@Mapping(ignore = true).Proposal:
ignoreByDefaultalso disables complaints about unmapped source properties :-)This should be quite easy to implement, if you agree I can submit a PR.