Repository navigation
Immutable attribute need to use "get" prefix? #3641
pandoras-toolbox
started this conversation in
General
Replies: 2 comments 1 reply
|
Yes, MapStruct is looking for accessors based on the JavaBeans conventions, see here:
You can provide your own |
0 replies
|
Thank you! It surprised me especially because in the previous company I used also Immutables and MapStruct with getter/setters not having any prefix, and it worked. I think it is more easy to read without "get"/"set" prefixes, especially when setting many attributes. Therefore I think I will try that |
1 reply
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.
Today I stumbled over a basic MapStruct behavior. Actually I think the reason is said in this StackOverflow posting because I had the same error message: https://stackoverflow.com/a/62846707
Does that mean this method name style is not supported by MapStruct?
Does it really has to be like that?
It worked for me finally with the second variant, not with the first variant. But I would like to have the freedom not to use "get" prefix for the immutables attribute names and still be able to use MapStruct if possible?
All reactions