Is there a way to pass a value to a custom annotation for mapping? #3898
-
I've created a import org.mapstruct.Mapping
@Retention(AnnotationRetention.SOURCE)
@Mapping(target = "id", expression = "java(com.github.f4b6a3.uuid.UuidCreator.getTimeOrderedEpochPlus1())")
annotation class MapIdToNewUUIDv7 That's nice and reusable since no other information is needed. But I'm also trying to map this:
|
Beta Was this translation helpful? Give feedback.
Answered by
filiphr
Jul 27, 2025
Replies: 1 comment
-
We don't have something like that in the moment @efenderbosch-atg. However, we do have #3216, where it would be easy to write a custom method like the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
efenderbosch-atg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We don't have something like that in the moment @efenderbosch-atg. However, we do have #3216, where it would be easy to write a custom method like the
generateForClass
where the parameter could be the@TargetType
or something like that.