Skip to content

DESCRIBE IMPORT MAPPING output does not round-trip: ExposedName still capitalised and Item-suffixed on v0.18.0 (follow-up to #882) #915

Description

@MendixMau

Summary

#882 ("CREATE IMPORT MAPPING does not persist the JSON member names it is given") was closed as completed on 2026-08-13. The runtime-critical half is genuinely fixed — the stored JsonPath now preserves the original JSON keys verbatim. Thank you.

What still reproduces on v0.18.0 is the other half: ExposedName is still capitalised and still gets an Item suffix on array bindings, and DESCRIBE IMPORT MAPPING renders ExposedName rather than the JSON member name. So describe output no longer matches the script that produced it, and does not round-trip.

This is a much smaller bug than #882 as originally reported — no runtime breakage that I can demonstrate — so I am filing it separately rather than reopening.

Environment

mxcli v0.18.0 (2026-08-14T20:29:13Z), official darwin-arm64 release binary
Mendix 11.12.0
OS macOS 15 (Darwin 25.6.0), arm64

Reproduction

create json structure "B"."JS_Lower"
  snippet $${ "total": 1, "camelCase": "x", "item": [ { "name": "a" } ] }$$;

create non-persistent entity "B"."LRoot" ( "Total": Integer, "Camel": String(200) );
create non-persistent entity "B"."LItem" ( "Nm": String(200) );
create association "B"."LItem_LRoot" from "B"."LItem" to "B"."LRoot" type reference owner default;

create import mapping "B"."IMM_Lower" with json structure "B"."JS_Lower"
{
  create B.LRoot {
    Total = total,
    Camel = camelCase,
    create B.LItem_LRoot/B.LItem = item {
      Nm = name
    }
  }
};

Then: mxcli -p app.mpr -c "DESCRIBE IMPORT MAPPING B.IMM_Lower"

Actual

create import mapping B.IMM_Lower
  with json structure B.JS_Lower
{
  create B.LRoot {
    Total = Total,                                  <-- source said: total
    Camel = CamelCase,                              <-- source said: camelCase
    create B.LItem_LRoot/B.LItem = ItemItem {       <-- source said: item
      Nm = Name                                     <-- source said: name
    }
  }
};

Re-executing this describe output is not equivalent to the original script.

What the stored BSON shows

Decoded from the mapping's .mxunit (plain uncompressed BSON), same mapping, authored by v0.18.0:

ExposedName values:  Root, Total, CamelCase, ItemItem, Name
JsonPath values:     (Object)
                     (Object)|total
                     (Object)|camelCase
                     (Object)|item|(Object)
                     (Object)|item|(Object)|name

JsonPath is correct on every element — original casing preserved, no Item suffix. Only ExposedName is transformed, and DESCRIBE renders ExposedName.

Note the array suffix is unconditional, so it can collide: a JSON member literally named item becomes ItemItem, and (as in #882) __Value becomes __ValueItem.

Expected

Either ExposedName should hold the JSON member name as given, or DESCRIBE IMPORT MAPPING should render JsonPath's member name so that its output round-trips.

What I have not established

Whether ExposedName is load-bearing at runtime. Given JsonPath is correct I would expect not, but I could not run the app on this machine to confirm (macOS mxbuild issue, unrelated). If ExposedName is purely cosmetic then this is a describe/round-trip bug only, which is how I have titled it.

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