I have an immutable DTO with all fields final
, having only getters and no setters.
How can I use ModelMapper to add custom mapping from my entity to this DTO?
Documentation shows usage with mapping getters to setters, but my DTO has no setters because it is immutable...
I'm trying to use ModelMapper to auto copy bulk of fields and customize a few myself, thus preventing using a n-arg DTO constructor.