| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This page lists breaking changes (either API or behavioral changes) in MapStruct releases.
Starting from 1.2.0.Beta3. All the migration notes can be found at releases
MapStruct from now on starts to generate methods when property names match between source and target and there is no matching method available. This was already done for Map - and Iterable mapping methods. Prior to this release, one had to define an mapping method or to have a qualifying method in one of the mappers in the 'uses' field in @Mapper. MapStruct will generate an error when its not able to do so.
The generated code for nested target mappings has been altered in relation to issue #1011.
There are two behavioural changes regarding the handling of null values:
Nested mappings that refer to a primitive type source property and map to a target property that inherits from java.lang.Object will be mapped to null if one of the parent beans of the source property is null.
Example: @Mapping( target = "targetObjectProperty", source = "sourceObjectProperty.primitiveProperty" ) sets targetObjectProperty to null if sourceObjectProperty == null.
More info: issue #931.
There were once two null checks on the source property in generated java.lang.Collection to java.lang.Collection mappings. The sequence was as such in pseudo code: null-check-outer-source-property { null-check-target-propety { null-check-inner-source-propety { mapping } } } The null-check-outer-source-property is removed, since it can be controlled with the null-check-inner-source-propety. Please note: null-check-inner-source-propety is either the same as null-check-outer-source-property when mapped direct or the result of a mapping method. In the latter case, the result of the mapping method can be controlled by the user.
| Back | FazBrowse Home | New Git URL |