@filiphr filiphr released this Aug 28, 2017 · 137 commits to master since this release

Assets 6


  • Extension of mappingInheritanceStrategy, removing of name based ignore reverse mapping (#1255) - See important notice

Bug fixes

  • Use update methods for different sources for nested targets (#1269)


  • Fixing typos in the documentation
  • Add note that @MappingTarget must not be null (#748)


  • Add japicmp for the MapStruct API (#1231)
  • Deploy SNAPSHOTs from Travis (#1251)

Important notice:

  • With the fix for #1065 in 1.2.0.Beta2, where we added inheritance of Reverse Mappings as well, the issue #1255 occurred. Therefore the MappingInheritanceStrategy has been extend:
    • EXPLICIT - Only inherits if explicitly stated
    • AUTO_INHERIT_FROM_CONFIG - Will automatically inherit only forward configuration
    • AUTO_INHERIT_REVERSE_FROM_CONFIG - Will automatically inherit only reverse configuration
    • AUTO_INHERIT_ALL_FROM_CONFIG - Will automatically inherit both forward and reverse configuration

Additionally mappings that only have target name and ignore are inherited only in forward mappings, no matter of the inheritance strategy.

A mapping like:

@Mapping(target = "field1", ignore = true)
TargetBase map(SourceBase source)

Will only inherit forward mappings. There won't be any name based matching for ignoring in the reverse. If you want to ignore a field with the same name in SourceBase you will need to define a mapping like:

@Mapping(target = "field1", source = "field1`, ignore = true)`
TargetBase map(SourceBase source)