I try to use mapstruct feature @InheritInverseConfiguration. But it gives me the following error: There is no suitable result type constructor for reversing this method. But the generated Impl look pretty good.

@Mapper(uses = {
  BOIdMapper.class,
  DateMapper.class,
  CarVOFactory.class,
})
public interface CarMapper {
   CarMapper INSTANCE = Mappers.getMapper(CarMapper .class);

   @Mappings({
     @Mapping(source = "VOKey", target = "id"),
     @Mapping(source = "gueltAb", target = "gueltigAb")
   })
   Car map(CarVO carVO);

   @InheritInverseConfiguration
   CarVO map(Car car);

   public class CarVOFactory {
      public CarVO createCarVO() {
         return VOFactory.createVO(CarVO.class);
      }
   }
}

This is the POJO Car

public class Car {

    private String id;
    private LocalDate gueltigAb;
    ...
}

This is the other Car-Class:

public interface CarVO extends ... {
    void setVOKey (VOKey<CAR> voKey);
}
0

There are 0 answers