Skip to content

SimplePropertyNameMapper should be recursive #44

@brunomendola

Description

@brunomendola

SimplePropertyNameMapper should fall back to searching for parent mapping if the mapping for a more nested field is not found.

For example, given the mapping:

SimplePropertyNameMapper MAPPER = SimplePropertyNameMapper.builder()
      .mapping("a", "b")
      .mapping("c", "d")
      .mapping("e", "f")
      .mapping("e.g", "f.h")
      .build()

then the following should happen:

MAPPER.mapPropertyName("e") // directly mapped
// f
MAPPER.mapPropertyName("e.g") // directly mapped
// f.h
MAPPER.mapPropertyName("e.i") // not directly mapped, but the parent is directly mapped
// f.i
MAPPER.mapPropertyName("e.i.j") // not directly mapped, but the parent of the parent is mapped
// f.i.j

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions