I use Mapstruct and JOOQ for mapping between record-class and POJO. Today I tried to switch from Mapstruct 1.2.0.Final to 1.3.0.Final. But I get compilation errors like this - Unmapped target properties: "value1, value2, value3, value4".
JOOQ generate record-class with usual setters/getters and some public non-static methods with a name like valueN. valueN methods generates for each setter/getter.
With Mapstruct 1.2.0.Final it works perfectly fine. ValueN methods ignored in generated mappers. Generated mappers use only getters-setters. I didn't set ignore for ValueN explicitly.
How I can fix this behavior in Mapstruct 1.3.0.Final gracefully? How to configure Mapstruct for using only getters-setters?
Now I see two options:
Option 1.
Use @Mapping(target = "value1", ignore = true) for all valueN methods. Can I use some regexp pattern in target prop for ignore all valueN methods in single @Mapping?
Option 2. Write my own AccessorNamingStrategy
Should I just choose one of the options above or Mapstruct has any config options for returning 1.2.0 behavior maybe?
In 1.3.0.Final in order to disable the fluent accessors you would have to go with option 1 or option 2 unfortunately.
If you go with option 2 then you can extend from DefaultAccessorNamingStrategy and then for isFluentSetter return false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With