diff --git a/src/transformers/visitors/toOrchestrationVisitor.ts b/src/transformers/visitors/toOrchestrationVisitor.ts index 2923146e..e5998269 100644 --- a/src/transformers/visitors/toOrchestrationVisitor.ts +++ b/src/transformers/visitors/toOrchestrationVisitor.ts @@ -1454,7 +1454,7 @@ const visitor = { if (!lhs) lhs = node.expression.subExpression; indicator = scope.getReferencedIndicator(lhs, true); - const name = indicator.isMapping + let name = indicator.isMapping ? indicator.name .replace('[', '_') .replace(']', '') @@ -1540,6 +1540,9 @@ const visitor = { return; } } + if (indicator.isMapping && indicator.isStruct){ + name = `${name}_${node.expression.leftHandSide.memberName}`; + } // if its an incrementation, we need to know it happens but not copy it over if (node.expression.isIncremented && indicator.isPartitioned) { const newNode = buildNode(node.nodeType, {