Problem
When a RETRIEVE statement compares an enumeration attribute against a string literal, mxcli silently accepts it — both at parse time (mxcli check) and execution time (mxcli exec). The query returns zero results without any warning, making the bug very hard to diagnose.
-- Silently returns empty list (Status is an enumeration, not a string)
RETRIEVE $IssueList FROM OrderManagement.OrderIssue
WHERE Status = 'Open';
Expected behavior
mxcli should detect the type mismatch and raise an error with a clear message, e.g.:
Error: Cannot compare enumeration attribute 'Status' (OrderManagement.ENUM_IssueStatus)
with string literal 'Open'. Use fully qualified enum value:
OrderManagement.ENUM_IssueStatus.Open
Ideally this should be caught at check time (mxcli check --references), but at minimum it should error at execution time.
Correct syntax
RETRIEVE $IssueList FROM OrderManagement.OrderIssue
WHERE Status = OrderManagement.ENUM_IssueStatus.Open;
Impact
This caused a production dashboard to show all-zero KPI counters (Open Issues, In Production, Shipped) with no indication of why. The root cause — string vs enum comparison — took manual analysis to find.
Suggested scope
mxcli check --references: validate RETRIEVE WHERE operand types match attribute types
mxcli exec: reject type-mismatched comparisons at runtime with actionable error message
Problem
When a
RETRIEVEstatement compares an enumeration attribute against a string literal, mxcli silently accepts it — both at parse time (mxcli check) and execution time (mxcli exec). The query returns zero results without any warning, making the bug very hard to diagnose.Expected behavior
mxcli should detect the type mismatch and raise an error with a clear message, e.g.:
Ideally this should be caught at check time (
mxcli check --references), but at minimum it should error at execution time.Correct syntax
Impact
This caused a production dashboard to show all-zero KPI counters (Open Issues, In Production, Shipped) with no indication of why. The root cause — string vs enum comparison — took manual analysis to find.
Suggested scope
mxcli check --references: validate RETRIEVE WHERE operand types match attribute typesmxcli exec: reject type-mismatched comparisons at runtime with actionable error message