Access @MappingTarget in custom mapper
#3942
Unanswered
Blackbaud-JasonBodnar
asked this question in
Q&A
Replies: 1 comment
-
|
Suprisingly I just searched for this and found this answer: Although I tried to use this and it feels hacky, as you need to provide the same instance as @MappingTarget and @context. But maybe thats ok in your case? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a mapper that is updating an existing entity:
The source and the entity both have
formModewhich has:I only want to update
dateChangedifsource.formMode.valuedoes not equalentity.formMode.value, ie the form mode has changed.A co-worker is doing that with:
and then annotating the
updateEntity()with:I try to avoid using
expressionis possible so I'm wondering if there's a better way to get bothsource.formModeandentityto the method responsible for updatingentity.formMode.Beta Was this translation helpful? Give feedback.
All reactions