Skip to content

1.2.0-Beta1 Automapping Feature: Doesn't work with "Unmapped target property" on the child Bean. #1104

@brabenetz

Description

@brabenetz

An "Unmapped target property" on the child Bean shows the error Consider to declare/implement a mapping method: ...:
MapStructWithHirarchyMapper.java.txt

The annotation @Mapping(ignore = true, target = "child.id") solves that issue.
But, ...

  1. There should not be an Error. A warning like Unmapped target property: "child.id" would be more appropriate.

  2. If unmappedTargetPolicy = ReportingPolicy.IGNORE then there should not even be a warning.

Background:
This was the root error I searched for: My Domain Objects all extends a MappedSuperClass which contains the Database Id.
This MappedSuperClass should not be relevant for the mapping, because the DB-Id is not exposed to the DTOs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions