Have you tried MapStruct [1]?// Harald
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACYLA9E0YY9Q6TP9TbjMO8PiKpzhXAiC7Uw4fK%2B3-%3D3AbCT1jA%40mail.gmail.com.
The general philosophy of MapStruct is to generate code which looks as much as possible as if you had written it yourself from hand. In particular this means that the values are copied from source to target by plain getter/setter invocations instead of reflection or similar
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACYLA9FjHcku7LXVqweHTFYk0AeU%2BX3Ee2h8c3c2hAaNsFUwXw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACYLA9GpMMt7V85ah8ammX1Es3iCWyBb4OpZ8O5cpdWPvjd_2g%40mail.gmail.com.
Reading that blog
Very important: The component model should be set to CDI, as this will allow us to easily inject the generated mapper implementation.
Side note: As you need to use CDI for all mappers it’s recommended to define a @MapperConfig and refer to it in all your mappers, this is the way I did it in the example on GitHub. But for simplicity I skipped it here.
Time for an extension that actually enforces that! This is madness otherwise (well I might exaggerate the madness part :).
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CANwCmXKGzJs6n%3DDj_vSD3q%2BW0P6qCh_p0jrW7jzn6nX8%3D2Lwhg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CANwCmX%2B9h9WXavXBkEQuYGxQ5L9a82khqWFo5SGb8CG9DhnMYA%40mail.gmail.com.