Version: mxcli 0.23.0 (Windows), Mendix 11.12.1
What happens
An apostrophe inside an OQL -- comment makes the view-entity column checker mis-split the SELECT list,
producing false MDL030 select column N has no as alias errors against the comment text itself.
Repro
mxcli check apos.mdl, no project needed. A comment without an apostrophe is fine:
create view entity MyFirstModule.SaleStats (
CustomerName: String(200),
Total: Integer
) as (
SELECT
s.CustomerName as CustomerName,
-- how many orders this customer placed
SUM(s.Amount) as Total
FROM MyFirstModule.Sale as s
GROUP BY s.CustomerName
);
→ ✓ Syntax OK (1 statements) / Check passed!
Change only the comment so it contains an apostrophe:
-- the customer's running total, summed here rather than on the page
→
✗ select column 2 has no as alias: '-- the customer's running total' [MDL030]
✗ select column 3 has no as alias: 'summed here rather than on the page [MDL030]
Two things go wrong at once: the comment is counted as a select column at all, and it is then split on
its internal comma into two phantom columns.
Impact
Comments are the normal way to document a non-obvious view, and prose comments contain apostrophes
constantly. On a real 31-column view with eight documented columns this produced 12 errors, every one
of them quoting a fragment of a comment, none of them a real defect — mx check reported 0 errors on the
same model.
Because exec refuses to run when the check fails, the only routes offered are --no-check (the wrong
habit to build on a shared model) or deleting a colleague's documentation to satisfy the parser. In
practice it means a documented view entity cannot be round-tripped at all.
Expected
Strip -- to end-of-line before splitting the SELECT list into columns.
Version: mxcli 0.23.0 (Windows), Mendix 11.12.1
What happens
An apostrophe inside an OQL
--comment makes the view-entity column checker mis-split the SELECT list,producing false
MDL030 select column N has no as aliaserrors against the comment text itself.Repro
mxcli check apos.mdl, no project needed. A comment without an apostrophe is fine:→
✓ Syntax OK (1 statements)/Check passed!Change only the comment so it contains an apostrophe:
→
Two things go wrong at once: the comment is counted as a select column at all, and it is then split on
its internal comma into two phantom columns.
Impact
Comments are the normal way to document a non-obvious view, and prose comments contain apostrophes
constantly. On a real 31-column view with eight documented columns this produced 12 errors, every one
of them quoting a fragment of a comment, none of them a real defect —
mx checkreported 0 errors on thesame model.
Because
execrefuses to run when the check fails, the only routes offered are--no-check(the wronghabit to build on a shared model) or deleting a colleague's documentation to satisfy the parser. In
practice it means a documented view entity cannot be round-tripped at all.
Expected
Strip
--to end-of-line before splitting the SELECT list into columns.