Skip to content

Improve error messages for auto generated mappings #2788

@afwlehmann

Description

@afwlehmann
  • Is this an issue (and hence not a question)?

The documentation of Mapper#disableSubMappingMethodsGeneration states that if one had to use it, the case should be reported, and here we go.

In our case we had a deeply nested hierarchy of types. For each of those types, a corresponding DTOs exists in another package, but these DTOs do not necessarily contain all of the fields of the source types. When working with the default setting of disableSubMappingMethodsGeneration == false, the error messages contain only the raw names of the unmapped source fields, but do not yield the information to which type each of the unmapped fields belongs. Hence turning off auto generation made it a lot easier to find the corresponding culprits. Maybe the error messages could be improved to something like Unmapped source property: typeA.typeB.foo.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions