Skip to content

ALTER ENTITY ADD ATTRIBUTE drops system members (createdDate) on sibling generalization root — CE1613 across inheriting entities #657

@Chendodelangen

Description

@Chendodelangen

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

  1. Baseline validation is clean: mx check AssetManagement.mpr → 0 errors.
  2. Run:
    ALTER ENTITY AuditTrail_Custom."AuditLog" ADD ATTRIBUTE "AssetLabel": String(20)
    mxcli reports: Added attribute 'AssetLabel' to entity AuditTrail_Custom.AuditLog
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions