Skip to content

DataGrid 2 column over an association owned by another module is written as a flat attribute path (mx check CE1613; check/exec pass) #1240

Description

@MohamedElNady

mxcli version: v0.24.0 (2026-09-24T05:44:35Z), Windows amd64
Mendix version: 11.14.0 (MPR v2), blank project

Summary

A Data grid 2 column whose attribute path goes through an association owned by a module other than the grid entity's module is stored as a flat string: AttributeRef.Attribute = 'ModH.Order.Order_Customer/Customer_Region/Name' with no EntityRef. mxcli check --references and mxcli exec both pass; mx check then reports CE1613. DESCRIBE PAGE round-trips the path, so the problem is invisible until mx check.

Related but different: #830 (the association itself as a column, one hop) and #1045.

Minimal repro

create module "ModH";
create module "ModK";
create persistent entity "ModK"."Region" ("Name": String(100));
create persistent entity "ModK"."Customer" ("Name": String(100));
create persistent entity "ModH"."Order" ("Number": String(20));
create association "ModH"."Order_Customer" from "ModH"."Order" to "ModK"."Customer" type Reference;
create association "ModK"."Customer_Region" from "ModK"."Customer" to "ModK"."Region" type Reference;
create page "ModH"."OrdersPage" (Title: 'Orders', Layout: Atlas_Core.Atlas_Default) {
  datagrid dgOrders (DataSource: database "ModH"."Order") {
    column colNumber (Attribute: Number, Caption: 'Number')
    column colRegion (Attribute: Order_Customer/Customer_Region/Name, Caption: 'Region (2nd association owned by ModK, unqualified)')
  }
};

Expected

The column stored the way Studio Pro stores it: Attribute = 'ModK.Region.Name' plus an IndirectEntityRef with one EntityRefStep per association (ModH.Order_Customer → ModK.Customer, ModK.Customer_Region → ModK.Region), and mx check 0 errors.

Actual

$ mx check Repro.mpr
[error] [CE1613] "The selected attribute 'ModH.Order.Order_Customer/Customer_Region/Name' no longer exists." at Columns (2/2) of data grid 2 'dgOrders'
The app contains: 1 errors.

What narrows it down (same blank project, reset between runs)

Variant mx check
Both associations in the page entity's module (CREATE PAGE) 0 errors
Same, column added with ALTER PAGE … INSERT 0 errors
2nd association in the page module, target entity in another module 0 errors
2nd association owned by another module (the repro above) CE1613
Qualifying it: Attribute: Order_Customer/ModK.Customer_Region/Name parse error (mismatched input '.') — so no MDL-side workaround

So the unqualified association name after the first hop seems to be resolved only in the grid entity's module; when that lookup fails the writer falls back to the raw text instead of raising an error. Text-template parameters over the same two-hop path (ContentParams: [{1} = ModH.Order_Customer/ModK.Customer_Region/Name]) are written correctly (seen in our app).

Suggestions

  1. Resolve each association step in the module of the entity reached so far (or globally when the name is unique), and allow qualified names in a column attribute path.
  2. If a step cannot be resolved, make check --references / exec fail instead of writing an unresolvable string.

Workaround we use

A small offline pass that rewrites such refs into the IndirectEntityRef form after exec (Studio Pro closed), then mx check.

Session log (isolated HOME, only this repro)

mxcli-2026-09-30.log
{"time":"2026-09-30T08:51:50.7286533+03:00","level":"INFO","msg":"session_start","version":"v0.24.0","go":"go1.26.6","os":"windows","arch":"amd64","mode":"mxcli exec","args":["C:\\Tools\\mxcli.exe","exec","D:/Mohamed/Mendix/_mxrepro/scripts/g47d.mdl","-p","Repro.mpr"],"pid":8424,"parent_pid":""}
{"time":"2026-09-30T08:51:50.768957+03:00","level":"INFO","msg":"connect","mpr_path":"Repro.mpr","mendix_version":"11.14.0","mpr_format":2}
{"time":"2026-09-30T08:51:50.768957+03:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'Repro.mpr'","duration_ms":2}
{"time":"2026-09-30T08:51:52.9754407+03:00","level":"INFO","msg":"execute","stmt_type":"CreateModuleStmt","stmt_summary":"create module ModH","duration_ms":159}
{"time":"2026-09-30T08:51:53.1916676+03:00","level":"INFO","msg":"execute","stmt_type":"CreateModuleStmt","stmt_summary":"create module ModK","duration_ms":214}
{"time":"2026-09-30T08:51:53.3797636+03:00","level":"INFO","msg":"execute","stmt_type":"CreateEntityStmt","stmt_summary":"create entity ModK.Region","duration_ms":188}
{"time":"2026-09-30T08:51:53.5453176+03:00","level":"INFO","msg":"execute","stmt_type":"CreateEntityStmt","stmt_summary":"create entity ModK.Customer","duration_ms":165}
{"time":"2026-09-30T08:51:53.7254129+03:00","level":"INFO","msg":"execute","stmt_type":"CreateEntityStmt","stmt_summary":"create entity ModH.Order","duration_ms":180}
{"time":"2026-09-30T08:51:54.0141595+03:00","level":"INFO","msg":"execute","stmt_type":"CreateAssociationStmt","stmt_summary":"create association ModH.Order_Customer","duration_ms":288}
{"time":"2026-09-30T08:51:54.2256876+03:00","level":"INFO","msg":"execute","stmt_type":"CreateAssociationStmt","stmt_summary":"create association ModK.Customer_Region","duration_ms":211}
{"time":"2026-09-30T08:51:54.4623651+03:00","level":"INFO","msg":"execute","stmt_type":"CreatePageStmtV3","stmt_summary":"create page ModH.OrdersPage","duration_ms":236}
{"time":"2026-09-30T08:51:54.5501945+03:00","level":"INFO","msg":"session_end","commands_executed":9,"errors_count":0,"duration_s":3,"pid":8424}
{"time":"2026-09-30T08:52:03.9455476+03:00","level":"INFO","msg":"session_start","version":"v0.24.0","go":"go1.26.6","os":"windows","arch":"amd64","mode":"batch","args":["C:\\Tools\\mxcli.exe","-p","Repro.mpr","-c","describe page ModH.OrdersPage"],"pid":23900,"parent_pid":""}
{"time":"2026-09-30T08:52:03.9977779+03:00","level":"INFO","msg":"connect","mpr_path":"Repro.mpr","mendix_version":"11.14.0","mpr_format":2}
{"time":"2026-09-30T08:52:03.9977779+03:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'Repro.mpr'","duration_ms":1}
{"time":"2026-09-30T08:52:04.1915316+03:00","level":"INFO","msg":"execute","stmt_type":"DescribeStmt","stmt_summary":"describe PAGE ModH.OrdersPage","duration_ms":193}
{"time":"2026-09-30T08:52:04.1915316+03:00","level":"INFO","msg":"session_end","commands_executed":2,"errors_count":0,"duration_s":0,"pid":23900}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions