From d60a0fc45181b19a3d79f99ef1eb16669e0b6bd8 Mon Sep 17 00:00:00 2001 From: Mohamed Elhennawy Date: Mon, 26 Jan 2026 13:19:18 +0100 Subject: [PATCH 1/2] Add support for comments in OQL syntax --- content/en/docs/refguide/modeling/domain-model/oql/_index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/docs/refguide/modeling/domain-model/oql/_index.md b/content/en/docs/refguide/modeling/domain-model/oql/_index.md index e82c6031ca8..c2760abb85e 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/_index.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/_index.md @@ -36,6 +36,8 @@ Identifiers are used for module, entity, attribute, association, and alias names Multiple identifiers can be composed into a path, separated by special characters `.` and `/`. The `.` special character can be used to indicate the module and entity in the form `Module.Entity`. The `/` special character can be used to indicate the attribute of an entity in the form `Module.Entity/Attribute` and it can be used for separating associations in long paths. Examples of paths can be seen in the [Select from Multiple Tables using JOIN](/refguide/oql-clauses/#join) section of *OQL Clauses*. +Comments can be used in OQL queries to improve readability. Single-line comments start with `--`. Multi-line comments are enclosed by `/* and */` and support nesting. Comments are ignored during query execution. + ### Reserved Words {#reserved-oql-words} Words with a specific purpose in OQL are reserved. If you use reserved words for entity, variable, or attribute names in an OQL query, they must be wrapped in double quotes `" "`. For example, in the OQL query `SELECT AVG(TotalPrice) FROM Sales."Order" WHERE IsPaid = 1`, `Order` needs to be wrapped in quotes because it is a reserved word, as it can be used to `ORDER BY`. From c48e33561c3fd8c18e53ac5776b3b6b02a616864 Mon Sep 17 00:00:00 2001 From: Mark van Ments <35492184+MarkvanMents@users.noreply.github.com> Date: Mon, 26 Jan 2026 15:41:45 +0100 Subject: [PATCH 2/2] Clarify comment usage in OQL for Mendix 11.7.0+ Updated the comments section in OQL documentation to specify that comments are supported in Mendix version 11.7.0 and above, and clarified the syntax for single-line and multi-line comments. --- content/en/docs/refguide/modeling/domain-model/oql/_index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/en/docs/refguide/modeling/domain-model/oql/_index.md b/content/en/docs/refguide/modeling/domain-model/oql/_index.md index c2760abb85e..3987ef3c23c 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/_index.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/_index.md @@ -36,7 +36,10 @@ Identifiers are used for module, entity, attribute, association, and alias names Multiple identifiers can be composed into a path, separated by special characters `.` and `/`. The `.` special character can be used to indicate the module and entity in the form `Module.Entity`. The `/` special character can be used to indicate the attribute of an entity in the form `Module.Entity/Attribute` and it can be used for separating associations in long paths. Examples of paths can be seen in the [Select from Multiple Tables using JOIN](/refguide/oql-clauses/#join) section of *OQL Clauses*. -Comments can be used in OQL queries to improve readability. Single-line comments start with `--`. Multi-line comments are enclosed by `/* and */` and support nesting. Comments are ignored during query execution. +In Mendix version 11.7.0 and above, comments can be used in OQL queries to improve readability. Comments are ignored during query execution. There are two ways to add comments: + +* Single-line comments start with `--`. +* Multi-line comments are enclosed by `/*` and `*/` and support nesting. ### Reserved Words {#reserved-oql-words}