Skip to content

JCCorreale/mapstruct-unmapped-source-property-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Issue Description

The issue is easily reproducible with this simple mapping:

@Mapping(target = "nested", source = "mySource")
MyTarget map(MySource mySource);

Where MyTarget.nested is of type MySource

When unmappedSourcePolicy is set to ReportingPolicy.ERROR, the report produces Unmapped source properties error (or warning in the case of ReportingPolicy.WARN)

The mapping code is generated correctly. For ReportingPolicy.ERROR is set, the following workaround is necessary in order to get a successful build:

@BeanMapping(ignoreUnmappedSourceProperties = { "field1", "field2" })

Where "field1", "field2" are the fields of MySource

MapStruct version is 1.4.2.Final

Possibly related issues

mapstruct/mapstruct#2253

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages