fix(data-mapper-v2): resolve XML attribute paths when loading saved maps#8770
Merged
fix(data-mapper-v2): resolve XML attribute paths when loading saved maps#8770
Conversation
When deserializing data maps containing XML attribute bindings within loops, the relative attribute path format './@AttributeName' was not being properly resolved back to the full schema node key. This caused "Source schema node not found" errors when reloading saved maps. The fix normalizes './@' prefixed paths by stripping the './' before constructing the full schema path lookup. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
✅ Contributors
✅ Screenshots/Videos
Summary Table
Final notes
Please update the PR with the CI result or an additional focused test if convenient, then proceed with merge. Thank you for the clear description and small, focused change!Last updated: Wed, 04 Feb 2026 21:07:25 GMT |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the Data Mapper v2 fails to load saved maps containing XML attribute bindings within loops. The error occurred because relative attribute paths (./@AttributeName) were not being properly resolved during deserialization, resulting in malformed paths like /loop/path/./@Attr instead of /loop/path/@Attr.
Changes:
- Added normalization logic to strip the
./prefix from./@attribute paths when resolving relative keys within loops - Re-enabled a previously skipped test case that validates this exact scenario
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libs/data-mapper-v2/src/mapHandling/MapDefinitionDeserializer.ts | Added path normalization in getSourceNodeForRelativeKeyInLoop() to handle ./@ attribute patterns correctly by stripping the ./ prefix before path construction |
| libs/data-mapper-v2/src/mapHandling/test/MapDefinitionDeserializer.spec.ts | Re-enabled test case that validates looping connections with index variables, conditionals, and relative attribute paths |
|
📊 Coverage check completed. See workflow run for details. |
rllyy97
approved these changes
Feb 4, 2026
ccastrotrejo
approved these changes
Feb 4, 2026
|
📊 Coverage check completed. See workflow run for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Type
Risk Level
What & Why
Fixes bug where Data Mapper fails to load saved maps containing XML attribute bindings within loops. The error "Source schema node not found, or invalid custom value for key './@id'" occurred because relative attribute paths (
./@AttributeName) were not being properly resolved during deserialization.Root cause: When constructing the schema lookup path,
./@Attrwas concatenated as/loop/path/./@Attrinstead of/loop/path/@Attr.Impact of Change
MapDefinitionDeserializer.ts- normalizes./@paths by stripping./prefixTest Plan
Contributors
No additional contributors.
🤖 Generated with Claude Code