You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the detailed example @xKrasusX. I am fairly certain that the root cause for this issue is the same as #3360. We are going to look into it in the same time as we are fixing that one.
…ue to runtime exception subclass exhaustive strategy (#3487)
filiphr
changed the title
Abstract class fields mapping issues
Defined mappings for subclass mappings with runtime exception subclass exhaustive strategy leads to compile error for the abstract class
May 9, 2024
filiphr
changed the title
Defined mappings for subclass mappings with runtime exception subclass exhaustive strategy leads to compile error for the abstract class
Defined mappings for subclass mappings with runtime exception subclass exhaustive strategy not working if result type is abstract class
May 9, 2024
Expected behavior
Mapstruct can map fields of abstract classes
Actual behavior
Mapstruct is not mapping fields of abstract classes - various problems occur
Steps to reproduce the problem
Source classes:
Target classes:
Mapper config:
Everything works fine so far, the mapper class is generated and mapping correctly all the fields.
The problem occurs when I'm trying to add anything related to name field in VehicleDto, for example:
In this case I'm getting a compilation error:
If I also add getter to the abstract target class:
It's still not working but the build error is different:
Isn't Mapstruct supposed to handle both these cases correctly and map the name field?
I'm using Java 17, Spring Boot 3.1.1, no Lombok.
MapStruct Version
1.5.5.Final
The text was updated successfully, but these errors were encountered: