Summary
Support reverse / bidirectional mapping so a single configuration can map Source → Target and Target → Source, including unflattening of previously flattened members.
AutoMapper provides this via ReverseMap. Mapperly requires separate methods; Mappa should define an explicit, compile-time approach.
Current behavior
Mappa generates one-way maps only. There is no mechanism to derive or declare a reverse map from an existing partial method.
Proposed scope
- Attribute or convention to declare a reverse companion map (or auto-generate when safe).
- Reverse property/constructor parameter pairing consistent with forward map overrides (
MappaUseProperty, etc.).
- Integration with flattening/unflattening (#120) when nested paths are involved.
- Clear diagnostics when reverse mapping is ambiguous or unsupported.
Acceptance criteria
Workflow notes
- Plan file:
.cursor/plans/issue_<N>_reverse_bidirectional_mapping.plan.md
- Related to #120 for unflattening
Summary
Support reverse / bidirectional mapping so a single configuration can map
Source → TargetandTarget → Source, including unflattening of previously flattened members.AutoMapper provides this via
ReverseMap. Mapperly requires separate methods; Mappa should define an explicit, compile-time approach.Current behavior
Mappa generates one-way maps only. There is no mechanism to derive or declare a reverse map from an existing partial method.
Proposed scope
MappaUseProperty, etc.).Acceptance criteria
.\Scripts\RunTestsAndReportCoverage.ps1Workflow notes
.cursor/plans/issue_<N>_reverse_bidirectional_mapping.plan.md