fix: emit correct enum value format for XPath vs expression contexts#167
fix: emit correct enum value format for XPath vs expression contexts#167engalar wants to merge 1 commit intomendixlabs:mainfrom
Conversation
Enum values require different serialization depending on context: - XPath (RETRIEVE WHERE): 'Value' (quoted value name only) - Expression (CHANGE/CREATE): Module.EnumName.Value (qualified) Fixes mendixlabs#125
AI Code ReviewWhat Looks Good
RecommendationThe PR is ready to approve. It correctly resolves the enum value formatting issue in both XPath and expression contexts with appropriate test coverage and minimal, focused changes that maintain backward compatibility. No issues were found against the review checklist. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Summary
Module.EnumName.Valuenow emit'Value'(quoted value only) instead of the full qualified name'Processing'are resolved toModule.EnumName.Processingwhen the attribute type is an enumeration (requires MPR context)xpathExprToString)Test plan
TestQualifiedNameToXPath_EnumValue— 3-part name →'Value'TestQualifiedNameToXPath_NonEnum— 2-part name passes throughTestExpressionToXPath_EnumInComparison— full WHERE clause roundtripTestExpressionToXPath_StringLiteralPreserved— string literals unchangedTestExpressionToString_QualifiedNameUnchanged— expression context keeps qualified nameTestXPath_EnumValueReference— visitor XPath roundtrip (3 sub-tests)go test ./mdl/...passes with 0 failuresFixes #125