Summary
ALTER ENTITY ... ADD ATTRIBUTE adds the attribute correctly, but re-serializes the module's domain-model unit and silently drops the system-member flags (createdDate) on an unrelated abstract entity in the same module. Pages in other modules whose grids/sort bars reference the inherited system member then fail validation with CE1613. None of mxcli's own validations catch this; DESCRIBE ENTITY output is identical before and after, so the damage is invisible until mx check / Studio Pro.
Environment
- mxcli version:
v0.12.0 (2026-06-04T13:16:22Z)
- Mendix version:
10.24.15.93102 (MPR v2 / mprcontents)
- OS: Windows 11, amd64
Project shape needed to reproduce
- Module
AuditTrail_Custom with an abstract entity AuditSuperClass that has system members enabled (DESCRIBE renders them as Owner: AutoOwner, ChangedBy: AutoChangedBy, CreatedDate: AutoCreatedDate, ChangedDate: AutoChangedDate).
- A plain sibling entity
AuditTrail_Custom.AuditLog in the same domain model (NOT part of the hierarchy).
- A specialization in another module:
WorkflowManagement.Task extends AuditTrail_Custom.AuditSuperClass.
- Pages with data grids that use the inherited system member
createdDate (lowercase) in columns/sort bars.
Steps to reproduce
- Baseline validation is clean:
mx check AssetManagement.mpr → 0 errors.
- Run:
ALTER ENTITY AuditTrail_Custom."AuditLog" ADD ATTRIBUTE "AssetLabel": String(20)
mxcli reports: Added attribute 'AssetLabel' to entity AuditTrail_Custom.AuditLog
- Validate again:
mx check AssetManagement.mpr
Expected behaviour
Only AuditLog gains the new attribute; nothing else in the unit changes. mx check stays at 0 errors.
Actual behaviour
mx check reports 7 errors, all in entities/pages that were never targeted:
[error] [CE1613] "The selected attribute 'WorkflowManagement.Task.createdDate' no longer exists." at Text 'text33'
[error] [CE1613] "The selected attribute 'WorkflowManagement.Task.createdDate' no longer exists." at Columns (1/4) of data grid 2 'dataGrid2_2'
[error] [CE1613] "The selected attribute 'AuditTrail_Custom.AuditSuperClass.createdDate' no longer exists." at Sort bar of data grid 2 'dataGrid2_2'
[error] [CE1613] "The selected attribute 'WorkflowManagement.Task.createdDate' no longer exists." at Columns (1/4) of data grid 2 'dataGrid2_2'
[error] [CE1613] "The selected attribute 'WorkflowManagement.Task.createdDate' no longer exists." at Sort bar of data grid 2 'dataGrid2_2'
[error] [CE1613] "The selected attribute 'WorkflowManagement.Task.createdDate' no longer exists." at Columns (1/5) of data grid 2 'dataGrid2_2'
[error] [CE1613] "The selected attribute 'WorkflowManagement.Task.createdDate' no longer exists." at Sort bar of data grid 2 'dataGrid2_2'
Git shows exactly two files changed: AssetManagement.mpr and one mprcontents/.../*.mxunit (the AuditTrail_Custom domain-model unit) — i.e. the re-serialization of that unit lost the system-member configuration of AuditSuperClass, which breaks every inheriting entity's createdDate references project-wide.
Why this is nasty
DESCRIBE ENTITY AuditTrail_Custom.AuditSuperClass produces byte-identical output before and after — mxcli cannot see its own damage.
mxcli check / mxcli lint pass; only Studio Pro / mx check catches it.
- The errors surface in modules far away from the ALTER target, so the cause is hard to trace without a git baseline.
Relevant log line (mxcli-2026-06-10.log)
{"time":"2026-06-10T16:50:51.2663371+02:00","level":"INFO","msg":"session_start","version":"v0.12.0","go":"go1.26.4","os":"windows","arch":"amd64","mode":"batch","args":["C:\\Claude\\AssetTest\\mxcli.exe","-p","AssetManagement.mpr","-c","ALTER ENTITY AuditTrail_Custom.\"AuditLog\" ADD ATTRIBUTE \"AssetLabel\": String(20)"],"pid":17184}
{"time":"2026-06-10T16:50:51.8499958+02:00","level":"INFO","msg":"execute","stmt_type":"AlterEntityStmt","stmt_summary":"AlterEntityStmt","duration_ms":569}
{"time":"2026-06-10T16:50:52.40756+02:00","level":"INFO","msg":"session_end","commands_executed":2,"errors_count":0,"duration_s":1}
Diagnostic bundle
Available: yes — mxcli-diag-20260610-165511.tar.gz (can be shared on request).
Recovery used
git reset --hard to the pre-ALTER checkpoint (restoring .mpr + model units together), after which mx check is clean again.
Summary
ALTER ENTITY ... ADD ATTRIBUTEadds the attribute correctly, but re-serializes the module's domain-model unit and silently drops the system-member flags (createdDate) on an unrelated abstract entity in the same module. Pages in other modules whose grids/sort bars reference the inherited system member then fail validation with CE1613. None of mxcli's own validations catch this;DESCRIBE ENTITYoutput is identical before and after, so the damage is invisible untilmx check/ Studio Pro.Environment
v0.12.0 (2026-06-04T13:16:22Z)10.24.15.93102(MPR v2 / mprcontents)Project shape needed to reproduce
AuditTrail_Customwith an abstract entityAuditSuperClassthat has system members enabled (DESCRIBE renders them asOwner: AutoOwner, ChangedBy: AutoChangedBy, CreatedDate: AutoCreatedDate, ChangedDate: AutoChangedDate).AuditTrail_Custom.AuditLogin the same domain model (NOT part of the hierarchy).WorkflowManagement.Task extends AuditTrail_Custom.AuditSuperClass.createdDate(lowercase) in columns/sort bars.Steps to reproduce
mx check AssetManagement.mpr→ 0 errors.Added attribute 'AssetLabel' to entity AuditTrail_Custom.AuditLogmx check AssetManagement.mprExpected behaviour
Only
AuditLoggains the new attribute; nothing else in the unit changes.mx checkstays at 0 errors.Actual behaviour
mx checkreports 7 errors, all in entities/pages that were never targeted:Git shows exactly two files changed:
AssetManagement.mprand onemprcontents/.../*.mxunit(theAuditTrail_Customdomain-model unit) — i.e. the re-serialization of that unit lost the system-member configuration ofAuditSuperClass, which breaks every inheriting entity'screatedDatereferences project-wide.Why this is nasty
DESCRIBE ENTITY AuditTrail_Custom.AuditSuperClassproduces byte-identical output before and after — mxcli cannot see its own damage.mxcli check/mxcli lintpass; only Studio Pro /mx checkcatches it.Relevant log line (mxcli-2026-06-10.log)
Diagnostic bundle
Available: yes —
mxcli-diag-20260610-165511.tar.gz(can be shared on request).Recovery used
git reset --hardto the pre-ALTER checkpoint (restoring.mpr+ model units together), after whichmx checkis clean again.