-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Expected behavior
When using @InheritConfiguration, if compilation succeed, all mappings from the inherited method must be used.
@Mapping(target = "someAtribute", source = "source.attribute")
@Mapping(target = "otherAttribute", source = "otherSource.anotherAttribute")
public abstract Target mapFromSource(Source source, OtherSource otherSource);
@InheritConfiguration(name = "mapFromSource")
@Mapping(target = "otherAttribute", source = "source", qualifiedByName = "otherMapping")
public abstract Target mapInherited(Source source, OtherSource otherSource);
@Named("otherMapping")
protected Long otherMapping(Source source) {
return source.getAttribute() != null ? 1L : 0L;
}Actual behavior
from the example, when using mapInherited(), someAtribute mapping is ignored.
Steps to reproduce the problem
It seems that the bug was introduced in 1.4.2 and is still there in 1.5.5
MapStruct Version
Mapstruct 1.4.2