Skip to content

seime/mapstruct-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Mapstruct mapping issue

Domain model using inheritance (simplified)

Domain model

DTO model using composition (simplified)

Each superclass from the domain model is a separate message field in the corresponding DTO class.

DTO model

Current way of solving it

Add @Mapping-annotations for each field, repeat for each concrete class (imagine an hierarchy 5-7 levels deep with hundreds of abstract classes - each with 2-10 own fields)

See here

Possible ideas for solutions

See here for example and discussion

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages