Hello!
I need to map machine-generated DTOs to object model, and I cannot annotate them , so im trying to convert previously annotation-based code to Kotlin DSL. While this is working fine for singluar fields, I cannot use this approach for collections - it shows compilation error.
example:
val mapper = mapper<FilterDto, Filter> {
autoMap(AutoMappingStrategy.BY_NAME)
FilterDto::targetTransformations mappedTo Filter::targetTransformations withTransformer ImplicitCollectionMappingTransformer::class.
FilterDto::valueTransformations mappedTo Filter::valueTransformations withTransformer ImplicitCollectionMappingTransformer::class
}
which gives me compilation error "None of the following functions can be called with the arguments supplied:" on withTransformer usage.
Previous (annotation based) version was like this:
@MappedField(transformer = ImplicitCollectionMappingTransformer::class) val targetTransformations: List<TransformationDto>? = emptyList(),
What is correct usage of DSL-based version of ImplicitCollectionMappingTransformer ?
Hello!
I need to map machine-generated DTOs to object model, and I cannot annotate them , so im trying to convert previously annotation-based code to Kotlin DSL. While this is working fine for singluar fields, I cannot use this approach for collections - it shows compilation error.
example:
which gives me compilation error "None of the following functions can be called with the arguments supplied:" on withTransformer usage.
Previous (annotation based) version was like this:
@MappedField(transformer = ImplicitCollectionMappingTransformer::class) val targetTransformations: List<TransformationDto>? = emptyList(),What is correct usage of DSL-based version of ImplicitCollectionMappingTransformer ?