Bug
When using association navigation in microflow expressions, mxcli generates expressions with two issues:
1. Missing target entity qualifier
Generated:
$Order / Module.Order_Customer / Name
Expected (valid Mendix expression):
$Order/Module.Order_Customer/Module.Customer/Name
The Mendix expression engine requires the full path: $var/Association/TargetEntity/Attribute. mxcli omits the target entity name, causing CE0117 ("Error(s) in expression").
Since the association definition already contains the target entity, mxcli should auto-resolve it during code generation.
2. Extra spaces around path separators
Generated:
$Order / Module.Order_Customer / Name
Expected:
$Order/Module.Order_Customer/Module.Customer/Name
The spaces around / are cosmetic but may also contribute to Mendix expression parser failures.
Root cause
The MDL-to-Mendix expression translator does not:
- Look up the association's target entity to insert it into the path
- Strip whitespace around
/ path separators
Repro
CREATE PERSISTENT ENTITY MyModule.Customer (Name: String(200));
CREATE PERSISTENT ENTITY MyModule.Order (OrderNumber: String(50));
CREATE ASSOCIATION MyModule.Order_Customer
FROM MyModule.Order TO MyModule.Customer TYPE Reference;
CREATE MICROFLOW MyModule.TestNav()
RETURNS String AS $Result
BEGIN
RETRIEVE $Order FROM MyModule.Order LIMIT 1;
DECLARE $CustName String = $Order/MyModule.Order_Customer/Name;
RETURN $CustName;
END;
/
DESCRIBE MICROFLOW output shows $Order / MyModule.Order_Customer / Name — fails CE0117 on mx check.
Expected fix
mxcli should generate: $Order/MyModule.Order_Customer/MyModule.Customer/Name
Bug
When using association navigation in microflow expressions, mxcli generates expressions with two issues:
1. Missing target entity qualifier
Generated:
Expected (valid Mendix expression):
The Mendix expression engine requires the full path:
$var/Association/TargetEntity/Attribute. mxcli omits the target entity name, causing CE0117 ("Error(s) in expression").Since the association definition already contains the target entity, mxcli should auto-resolve it during code generation.
2. Extra spaces around path separators
Generated:
Expected:
The spaces around
/are cosmetic but may also contribute to Mendix expression parser failures.Root cause
The MDL-to-Mendix expression translator does not:
/path separatorsRepro
DESCRIBE MICROFLOWoutput shows$Order / MyModule.Order_Customer / Name— fails CE0117 onmx check.Expected fix
mxcli should generate:
$Order/MyModule.Order_Customer/MyModule.Customer/Name