You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without missing mapping @Mapping(target = "inner1.innerName", source = "sourceName") just copy same named properties. With @Mapping(target = "inner1.innerName", source = "sourceName") - only "inner1.innerName" copied. It is no any MapStruct warring in such case, but only some fields copied.
It is valid workaround by adding mapping method from SourceLevel to InnerLevel.
Possible related to #3475.
Actual behavior
To compare different source behaviour, same type objects copied from source different sources
AndrisAncans
changed the title
Mapping from "."(target this) to target child object with additional custom mapping failed.
Mapping from "."(this) to target child object with additional custom mapping failed.
Dec 25, 2023
Expected behavior
Mapping from source "." to to target object fails for case with additional defined mapping.
Without missing mapping
@Mapping(target = "inner1.innerName", source = "sourceName")
just copy same named properties. With@Mapping(target = "inner1.innerName", source = "sourceName")
- only "inner1.innerName" copied. It is no any MapStruct warring in such case, but only some fields copied.It is valid workaround by adding mapping method from SourceLevel to InnerLevel.
Possible related to #3475.
Actual behavior
To compare different source behaviour, same type objects copied from source different sources
In result inner1 object filled only innerName value.
Before additional mapping
@Mapping(target = "inner1.innerName", source = "sourceName")
it was same name copy.Steps to reproduce the problem
Source objects:
Target objects:
Mapper:
Result build with incorrect sourceLevelToInnerLevel() method:
MapStruct Version
1.5.5.Final
The text was updated successfully, but these errors were encountered: