mapstruct / mapstruct/mapstruct
Mapping config should be transitive
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
In our model we have muliple level of inheritance. For example:
SpecialCustomer extends Customer extends Person.
In our mapping we have one mapper for every inheritence level (PersonMapper, CustomerMapper, SpecialCustomerMapper). To get the mapping config from PersonMapper in CustomMapper we use the config attribut in @Mapper and define a reference from CustomMapper to PersonMapper, thats fine.
But when I try to use the config attribute as well for SpecialCustomMapper and define the referernce to CustomMapper I do not get the configured mapping from Person.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Person, Customer, and SpecialCustomer mapper hierarchy described in the issue, focusing on how @Mapper config references are processed transitively. The work is done when SpecialCustomerMapper receives the mapping configuration from PersonMapper through CustomerMapper, with tests covering the inheritance chain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100