-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Labels
Milestone
Description
I have a very similiar reproducer with Mapstruct Version 1.6.3:
import java.time.LocalDate; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.ReportingPolicy; @Mapper(unmappedTargetPolicy = ReportingPolicy.ERROR) public interface RangeMapper { @Mapping(target = "validFrom", source = "rangeContainer.a") @Mapping(target = "validTo", source = "rangeContainer.b") RangeRecord toRange(RangeContainer rangeContainer); record RangeRecord(LocalDate validFrom, LocalDate validTo) { public RangeRecord restrictTo(RangeRecord other) { return null; } } class RangeContainer { private LocalDate a; private LocalDate b; public LocalDate getA() { return a; } public void setA(LocalDate a) { this.a = a; } public LocalDate getB() { return b; } public void setB(LocalDate b) { this.b = b; } } }On compile I get the error
Unmapped target property: "restrictTo"..
Reactions are currently unavailable