Skip to content

DESCRIBE MICROFLOW prints a retrieve XPath the parser rejects: where Assoc/Entity[...] without outer brackets #1237

Description

@kaspergff

Environment: mxcli nightly-20260927-95091765 (2026-09-27T08:03:29Z), Mendix 11.12.1, Windows 11.

Summary: For a retrieve whose XPath constraint starts with an association path followed by a predicate, describe microflow prints a where clause that the MDL parser rejects. The same text wrapped in outer brackets parses. So the DESCRIBE output is not re-executable.

Steps to reproduce

A microflow with a database retrieve on MyModule.OrderLine, XPath constraint [MyModule.OrderLine_Order/MyModule.Order[MyModule.Order_Customer = $Customer and MyModule.Order_Warehouse = $Warehouse]], sorted by LineNumber. mxcli describe microflow prints:

retrieve $List from MyModule.OrderLine
    where MyModule.OrderLine_Order/MyModule.Order[MyModule.Order_Customer = $Customer and MyModule.Order_Warehouse = $Warehouse]
    sort by MyModule.OrderLine.LineNumber asc;

Minimal script:

create microflow MyModule.GetOrderLines (
  $Customer: MyModule.Customer,
  $Warehouse: MyModule.Warehouse
)
returns List of MyModule.OrderLine as $List
begin
  retrieve $List from MyModule.OrderLine
    where MyModule.OrderLine_Order/MyModule.Order[MyModule.Order_Customer = $Customer and MyModule.Order_Warehouse = $Warehouse]
    sort by MyModule.OrderLine.LineNumber asc;
  return $List;
end;

Actual (mxcli check, syntax only)

line 8:49 mismatched input '[' expecting ';'

(the [ directly after the association path)

With outer brackets it parses:

    where [MyModule.OrderLine_Order/MyModule.Order[MyModule.Order_Customer = $Customer and MyModule.Order_Warehouse = $Warehouse]]

Simple constraints such as where Status = $x round-trip fine; the problem seems limited to constraints that begin with an association path + predicate.

Expected: DESCRIBE output parses. Either DESCRIBE prints the outer brackets in this case, or the parser accepts where Assoc/Entity[...] without them.

Possibly related: #772 (formatter dropping trailing brackets in a similar shape) and #499 (predicate boundaries on round-trip).

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