I've got project, where I often map dto -> db model. Almost all my db models have some additional fields, like version, which are never mapped from dto.
Is there any possibility or elegant workaround to ignore target fields globally only by theirs names?
For now I have to use @Mapping(target = "version", ignore = true). Cannot use @Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE), because I'd like to get warns or errors when I accidentally omit any important property. I control default behavior with '-Amapstruct.unmappedTargetPolicy=WARN', which I change for ERROR during developing new functions.
Some people may say that these are just warnings, but when there are many of them, it makes it harder to spot mistakes.
Mapstruct 1.3.1.Final, probably will move to 1.4.1.Final in nearest future. Searched through the docs, but couldn't find anything useful.
Thanks in advance for your answers :)