Skip to content

check --references should reject INDEX on String(unlimited) attributes #145

@engalar

Description

@engalar

Description

mxcli check script.mdl -p app.mpr --references does not reject an INDEX on a String(unlimited) attribute. However, Mendix/RDBMS cannot create database indexes on TEXT/CLOB columns, so Studio Pro raises a validation error.

Steps to Reproduce

CREATE PERSISTENT ENTITY MyModule.Customer (
  Code: String(unlimited) NOT NULL
)
INDEX (Code);
mxcli check script.mdl -p app.mpr --references
# ✓ All references valid  ← should fail

Expected Behavior

Reference validation should report an error:

Error: INDEX on attribute 'Code' is not allowed — String(unlimited) maps to TEXT/CLOB which cannot be indexed. Use a fixed length, e.g. String(200).

Actual Behavior

Validation passes silently. The error is only caught later by Studio Pro or mx check.

Impact

AI agents (and human developers) who rely on mxcli check --references as a pre-flight gate will produce invalid models that fail only at the Studio Pro validation stage.

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