Skip to content

Cross-module association navigation emits invalid expression without TargetModule. qualifier on target entity #829

Description

@MendixMau

Environment: mxcli (RnD build, commit 504aec67) and mxcli (Engalar fork, commit 26f2866),
Mendix Studio Pro 11.12.0 Beta, macOS (Darwin 25.5.0), confirmed on both.

Steps to reproduce:

  1. Create two modules, an entity in each, and a reference association from module A's entity to
    module B's entity (association declared in module A).
  2. Write a microflow expression that navigates through the association to the target entity's
    attribute using the short form: $Var/ModuleA.Assoc/EntityB/Attr (target entity name only, no
    ModuleB. prefix).
  3. mxcli exec the script (succeeds, no error from mxcli), then run mx check (mxbuild) or open
    the project in Studio Pro.
create module ZKT33A;
/
create module ZKT33B;
/
create persistent entity ZKT33A.EntityA ( Name: string );
/
create persistent entity ZKT33B.EntityB ( SomeAttr: string );
/
create association ZKT33A.Assoc_AToB
from ZKT33A.EntityA to ZKT33B.EntityB
type reference;
/
-- SHORT FORM (no target module qualifier) — this is the one under test
create microflow ZKT33A.ACT_ShortForm($Var: ZKT33A.EntityA)
returns string
begin
	declare $result string = $Var/ZKT33A.Assoc_AToB/EntityB/SomeAttr;
	return $result;
end;
/
-- FULLY-QUALIFIED FORM — control, compiles clean
create microflow ZKT33A.ACT_QualifiedForm($Var: ZKT33A.EntityA)
returns string
begin
	declare $result string = $Var/ZKT33A.Assoc_AToB/ZKT33B.EntityB/SomeAttr;
	return $result;
end;

Expected behavior: Either mxcli should reject the short form at exec/check --references
time with a clear error (matching the fully-qualified form Mendix apparently requires for
cross-module traversal), or it should silently write the correct fully-qualified BSON regardless
of which form the author typed, since it already knows the target entity's module from the domain
model.

Actual behavior: mxcli accepts the short form, writes it into the model unchanged, and does
not flag it via check --references. Studio Pro / mxbuild's own validation subsequently reports:

[error] [CE0117] "Error(s) in expression." at Create variable activity 'Create String variable'

The identical script with the target entity written as ModuleB.EntityB (fully qualified)
produces zero additional errors. This reproduces byte-for-byte identically on both the RnD build
and the Engalar fork — not yet fixed anywhere. Recommend mxcli either (a) auto-qualify the
target entity segment using the association's known target module at write time, or (b) surface
a clear check/check --references diagnostic instructing the author to fully qualify
cross-module entity segments, rather than deferring to a cryptic downstream mxbuild CE0117.

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