-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Hi,
I've defined a Mapper that should avoid cycles. For this reason I've just followed Mapstructs suggestion and invented the CycleAvoidingMappingContext. Doing so my current mapper looks like:
@Mapper(
config = MapstructConfig.class
)
public interface DataModificationMapperV1Physical extends Converter<DataModificationV1, DataModification> {
DataModification convert(DataModificationV1 from, @Context CycleAvoidingMappingContext context);
@InheritInverseConfiguration
@DelegatingConverter
DataModificationV1 inverseConvert(DataModification from, @Context CycleAvoidingMappingContext context);
}My problem obviously results from the additionally defined @DelegatingConverter because when compiling I get the following error:
Can only generate a delegating converter for methods with exactly one parameter and non-void return type.
Does anyone have an idea how to combine the CycleAvoidingMappingContext with @DelegatingConverter successfully?
Many thanks in advance,
Thorben
Metadata
Metadata
Assignees
Labels
No labels