Skip to content

Commit 3af0671

Browse files
akoclaude
andcommitted
docs: migrate remaining content into documentation site
Fill all stub pages with content from existing docs: - Language: microflows, pages, security, navigation, workflows, business events (31 pages) - Tools: code navigation, catalog, linting, testing, external SQL, Docker integration (32 pages) - IDE: VS Code extension, LSP server, mxcli init (14 pages) - Go Library: remaining API methods, builders, examples (6 pages) - Internals: MPR format, widget templates, catalog schema, design decisions, adding statements (10 pages) - Appendixes: glossary, SDK equivalence, version compatibility, error messages, changelog (5 pages) Only tutorial pages (Part I) and reference category READMEs remain as stubs — tutorial content needs to be written from scratch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bc5cfc6 commit 3af0671

File tree

98 files changed

+10984
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+10984
-97
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
# Changelog
22

33
Version history and release notes for ModelSDK Go and the mxcli tool.
4+
5+
## Releases
6+
7+
See [GitHub Releases](https://github.com/mendixlabs/mxcli/releases) for the complete version history, including:
8+
9+
- Release notes with feature descriptions
10+
- Pre-built binaries for all platforms (Linux, macOS, Windows -- amd64 and arm64)
11+
- Source code archives
12+
13+
## Versioning
14+
15+
mxcli follows [Semantic Versioning](https://semver.org/):
16+
17+
- **Major** -- breaking changes to the MDL language or Go library API
18+
- **Minor** -- new features and capabilities (backward-compatible)
19+
- **Patch** -- bug fixes and documentation updates
20+
21+
## Status
22+
23+
> **Alpha-quality software.** This project is in early stages. Expect bugs, missing features, and rough edges. Always back up your Mendix project files before using mxcli to modify them.
Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,148 @@
11
# Error Messages Reference
22

3-
Index of error messages produced by mxcli, the MDL parser, and the SDK, with explanations and suggested solutions.
3+
Common error messages from Studio Pro, mxcli, and the MDL parser, with explanations and solutions.
4+
5+
## Studio Pro Errors
6+
7+
These errors appear when opening a project in Studio Pro after modification by mxcli.
8+
9+
### TypeCacheUnknownTypeException
10+
11+
```
12+
TypeCacheUnknownTypeException: The type cache does not contain a type
13+
with qualified name DomainModels$Index
14+
```
15+
16+
**Cause:** The BSON `$Type` field uses the **qualifiedName** instead of the **storageName**. These are often identical, but not always.
17+
18+
**Solution:** Check the metamodel reflection data for the correct storage name:
19+
20+
| qualifiedName (wrong) | storageName (correct) |
21+
|-----------------------|----------------------|
22+
| `DomainModels$Entity` | `DomainModels$EntityImpl` |
23+
| `DomainModels$Index` | `DomainModels$EntityIndex` |
24+
25+
Look up the type in `reference/mendixmodellib/reflection-data/<version>-structures.json` and use the `storageName` field value.
26+
27+
### CE0463: Widget definition changed
28+
29+
```
30+
CE0463: The widget definition of 'DataGrid2' has changed.
31+
```
32+
33+
**Cause:** The widget's `WidgetObject` properties do not match its `PropertyTypes` schema. This happens when:
34+
35+
- A widget template is missing properties
36+
- Property values have incorrect types
37+
- The template was extracted from a different Mendix version
38+
39+
**Solution:**
40+
1. Create the same widget manually in Studio Pro
41+
2. Extract its BSON from the saved project
42+
3. Compare the template's `object` section against the Studio Pro version
43+
4. Update `sdk/widgets/templates/<version>/<Widget>.json` to match
44+
45+
See the debug workflow in `.claude/skills/debug-bson.md` for step-by-step instructions.
46+
47+
### CE0066: Entity access is out of date
48+
49+
```
50+
CE0066: Entity access for 'MyModule.Customer' is out of date.
51+
```
52+
53+
**Cause:** Association MemberAccess entries were added to the wrong entity. In Mendix, association access rules must only be on the **FROM** entity (the one stored in `ParentPointer`), not the TO entity.
54+
55+
**Solution:** Ensure `MemberAccess` entries for associations are added only to the entity that owns the foreign key (the FROM side of the association). Remove any association MemberAccess entries from the TO entity.
56+
57+
### System.ArgumentNullException (ValidationRule)
58+
59+
```
60+
System.ArgumentNullException: Value cannot be null.
61+
```
62+
63+
**Cause:** A validation rule's `Attribute` field uses a binary UUID instead of a qualified name string. The metamodel specifies `BY_NAME_REFERENCE` for this field.
64+
65+
**Solution:** Use a qualified name string (e.g., `"Module.Entity.Attribute"`) for the `Attribute` field in ValidationRule BSON, not a binary UUID.
66+
67+
## mxcli Parser Errors
68+
69+
### Mismatched input
70+
71+
```
72+
Line 3, Col 42: mismatched input ')' expecting ','
73+
```
74+
75+
**Cause:** Syntax error in the MDL statement -- typically a missing comma, semicolon, or unmatched bracket.
76+
77+
**Solution:** Check the MDL syntax at the reported line and column. Common issues:
78+
- Missing commas between attribute definitions
79+
- Missing semicolons at the end of statements
80+
- Unmatched parentheses or curly braces
81+
82+
### No viable alternative
83+
84+
```
85+
Line 1, Col 0: no viable alternative at input 'CREAT'
86+
```
87+
88+
**Cause:** Unrecognized keyword or misspelling.
89+
90+
**Solution:** Check the keyword spelling. MDL keywords are case-insensitive but must be valid. Run `mxcli syntax keywords` for the full keyword list.
91+
92+
## mxcli Execution Errors
93+
94+
### Module not found
95+
96+
```
97+
Error: module 'MyModule' not found in project
98+
```
99+
100+
**Cause:** The referenced module does not exist in the `.mpr` file.
101+
102+
**Solution:** Check the module name with `SHOW MODULES` and verify the spelling. Module names are case-sensitive.
103+
104+
### Entity not found
105+
106+
```
107+
Error: entity 'MyModule.Customer' not found
108+
```
109+
110+
**Cause:** The referenced entity does not exist in the specified module.
111+
112+
**Solution:** Check with `SHOW ENTITIES IN MyModule`. If the entity was just created, ensure the create statement executed successfully before referencing it.
113+
114+
### Reference validation failed
115+
116+
```
117+
Error: unresolved reference 'MyModule.NonExistent' at line 5
118+
```
119+
120+
**Cause:** A qualified name references an element that does not exist in the project. This error appears with `mxcli check script.mdl -p app.mpr --references`.
121+
122+
**Solution:** Verify the referenced element exists, or create it before the referencing statement.
123+
124+
## BSON Serialization Errors
125+
126+
### Wrong array prefix
127+
128+
**Symptom:** Studio Pro fails to load the project or shows garbled data.
129+
130+
**Cause:** Missing or incorrect integer prefix in BSON arrays. Mendix BSON arrays require a count/type prefix as the first element:
131+
132+
```json
133+
{
134+
"Attributes": [3, { ... }, { ... }]
135+
}
136+
```
137+
138+
**Solution:** Ensure all arrays include the correct prefix value (typically `2` or `3`). Check existing BSON output for the correct prefix for each array property.
139+
140+
### Wrong reference format
141+
142+
**Symptom:** Studio Pro crashes or shows null reference errors.
143+
144+
**Cause:** Using `BY_ID_REFERENCE` (binary UUID) where `BY_NAME_REFERENCE` (qualified string) is expected, or vice versa.
145+
146+
**Solution:** Check the metamodel reflection data for the property's `kind` field:
147+
- `BY_ID_REFERENCE` -> use binary UUID
148+
- `BY_NAME_REFERENCE` -> use qualified name string (e.g., `"Module.Entity.Attribute"`)
Lines changed: 128 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,130 @@
11
# Glossary
22

3-
Mendix-specific terms and concepts explained for developers who are new to the Mendix platform.
3+
Mendix-specific terms and concepts for developers who are new to the Mendix platform.
4+
5+
## A
6+
7+
**Association**
8+
A relationship between two entities. Analogous to a foreign key in relational databases. Mendix supports `Reference` (one-to-many or one-to-one) and `ReferenceSet` (many-to-many) types.
9+
10+
**Attribute**
11+
A property of an entity. Equivalent to a column in a relational database table. Types include String, Integer, Long, Decimal, Boolean, DateTime, AutoNumber, Binary, Enumeration, and HashedString.
12+
13+
**Access Rule**
14+
A security rule that controls which module roles can create, read, write, or delete instances of an entity, and which attributes they can access.
15+
16+
## B
17+
18+
**BSON**
19+
Binary JSON. The serialization format Mendix uses to store model elements inside MPR files. Each document (entity, microflow, page, etc.) is stored as a BSON blob.
20+
21+
**Building Block**
22+
A reusable page fragment that can be dragged onto pages in Studio Pro. Similar to a Snippet but intended for the toolbox.
23+
24+
## C
25+
26+
**Catalog**
27+
In mxcli, an in-memory SQLite database that indexes project metadata for fast querying, full-text search, and cross-reference navigation.
28+
29+
**Constant**
30+
A named value defined at the module level that can be configured per environment (development, acceptance, production). Used for API keys, URLs, feature flags, etc.
31+
32+
## D
33+
34+
**DataGrid**
35+
A widget that displays a list of objects in a tabular format with columns, sorting, and search. The classic DataGrid uses server-side rendering; DataGrid2 is the pluggable widget version.
36+
37+
**DataView**
38+
A widget that displays a single object, providing a context for input widgets (TextBox, DatePicker, etc.) to read and write attributes.
39+
40+
**Domain Model**
41+
The data model for a module, consisting of entities, their attributes, and associations between them. Analogous to an entity-relationship diagram.
42+
43+
## E
44+
45+
**Entity**
46+
A data type in the domain model. Equivalent to a table in a relational database. Entities can be persistent (stored in the database), non-persistent (in-memory only), or view (backed by an OQL query).
47+
48+
**Enumeration**
49+
A fixed set of named values (e.g., OrderStatus with values Draft, Active, Closed). Used as attribute types when the set of possible values is known at design time.
50+
51+
**Event Handler**
52+
Logic that runs automatically before or after a commit or delete operation on an entity. Configured on the entity in the domain model.
53+
54+
## G
55+
56+
**Gallery**
57+
A pluggable widget that displays a list of objects in a card/tile layout, as opposed to the tabular layout of a DataGrid.
58+
59+
**Generalization**
60+
Entity inheritance. When entity B generalizes entity A, B inherits all of A's attributes and associations. Analogous to class inheritance in object-oriented programming.
61+
62+
## L
63+
64+
**Layout**
65+
A page template that defines the common structure (header, sidebar, footer) shared by multiple pages. Every page references a layout.
66+
67+
**LayoutGrid**
68+
A responsive grid widget based on a 12-column system. Used to create multi-column layouts with breakpoints for phone, tablet, and desktop.
69+
70+
## M
71+
72+
**MDL (Mendix Definition Language)**
73+
A SQL-like text language for querying and modifying Mendix projects. The primary interface for mxcli.
74+
75+
**Microflow**
76+
Server-side logic expressed as a visual flow of activities. Microflows can retrieve data, call actions, make decisions, loop over lists, and return values. They run on the Mendix runtime (server).
77+
78+
**Module**
79+
A top-level organizational unit in a Mendix project. Each module contains its own domain model, microflows, pages, enumerations, and security settings. Analogous to a package or namespace.
80+
81+
**Module Role**
82+
A permission role defined within a module. Module roles are assigned to user roles at the project level. Entity access rules, microflow access, and page access are granted to module roles.
83+
84+
**MPR**
85+
Mendix Project Resource file. The binary file (`.mpr`) that contains the complete Mendix project model. It is a SQLite database with BSON-encoded documents.
86+
87+
## N
88+
89+
**Nanoflow**
90+
Client-side logic that runs in the browser (or native app). Syntactically similar to microflows but with restrictions (no database transactions, limited activity types). Used for offline-capable and low-latency operations.
91+
92+
## P
93+
94+
**Page**
95+
A user interface screen in a Mendix application. Pages contain widgets (TextBox, DataGrid, Button, etc.) and reference a layout for their outer structure.
96+
97+
**Pluggable Widget**
98+
A widget built with the Mendix Pluggable Widget API (React-based). Examples: DataGrid2, ComboBox, Gallery. Pluggable widgets use JSON-based property schemas (PropertyTypes) stored in the MPR.
99+
100+
## R
101+
102+
**Runtime**
103+
The Mendix server-side execution environment (Java-based) that runs the application. It interprets the model, handles HTTP requests, executes microflows, and manages the database.
104+
105+
## S
106+
107+
**Scheduled Event**
108+
A microflow that runs automatically on a timer (e.g., every hour, daily at midnight). Configured with a start time and interval.
109+
110+
**Snippet**
111+
A reusable UI fragment that can be embedded in multiple pages via a SnippetCall widget. Snippets can accept parameters.
112+
113+
**Studio Pro**
114+
The visual IDE for building Mendix applications. It reads and writes `.mpr` files. mxcli provides a complementary text-based interface to the same project files.
115+
116+
**Storage Name**
117+
The internal type identifier used in BSON `$Type` fields. Often the same as the qualified name, but not always (e.g., `DomainModels$EntityImpl` is the storage name for `DomainModels$Entity`).
118+
119+
## U
120+
121+
**User Role**
122+
A project-level role that aggregates module roles from one or more modules. End users are assigned user roles, which determine their permissions across the entire application.
123+
124+
## W
125+
126+
**Widget**
127+
A UI component on a page. Built-in widgets include TextBox, DataGrid, Button, Container, and LayoutGrid. Pluggable widgets extend this set with third-party components.
128+
129+
**Workflow**
130+
A long-running process with user tasks, decisions, and parallel paths. Workflows model approval processes, multi-step procedures, and human-in-the-loop automation.

0 commit comments

Comments
 (0)