From 5003a0bac10d246867bdcb8b551865dcb5983c21 Mon Sep 17 00:00:00 2001 From: MarkvanMents Date: Fri, 24 Oct 2025 10:17:34 +0200 Subject: [PATCH 1/2] Add Associations to OQL Statements --- .../domain-model/oql/oql-statements.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md b/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md index 3944b4b7a37..33f12a88110 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md @@ -11,15 +11,21 @@ aliases: ## Introduction -From Mendix version 11.1, you can delete objects in bulk using OQL `DELETE` statements. - -From Mendix version 11.3, you can also update object attributes in bulk using OQL `UPDATE` statements. OQL statements are translated to SQL statements that are sent to the database. This can be much faster than retrieving the objects in a microflow and then updating or deleting the resulting list. This feature is experimental and currently only accessible through the Java API by writing a Java action. +{{% alert color="info" %}} +From Mendix version 11.1, you can delete objects in bulk using OQL `DELETE` statements. + +From Mendix version 11.3, you can also update object attributes in bulk using OQL `UPDATE` statements. + +From Mendix version 11.4, you can update object associations as well as attributes in bulk using OQL `UPDATE` statements. + +{{% /alert %}} + ## Java API for OQL updates OQL Statements can be executed using the `Core.createOqlStatement` Java API. For example: @@ -87,9 +93,14 @@ SET Name = UPPER(Name) ``` +{{% alert color="info" %}} +Updating attributes was introduced in Mendix 11.3 + +Updating associations was added in Mendix 11.4 +{{% /alert %}} + ### OQL `UPDATE` Limitations -* At the moment, it is only possible to update attributes, not associations. * If a subquery or a long path over a many-to-one or many-to-many association is used as `expression`, it can result in multiple values. In that case, a database-level exception will occur when running the statement. * In the case of inheritance, it is not possible to simultaneously update an attribute and use that attribute in an expression to update an attribute on another inheritance level. See the example in [Mixed Attribute Update](#inheritance), below. * The general limitations for OQL statements also apply. See [General Limitations for OQL Statements](#oql-limitations), below. From 55c9b4314005b735899b985652cf68a362b18ca6 Mon Sep 17 00:00:00 2001 From: MarkvanMents Date: Fri, 24 Oct 2025 10:19:45 +0200 Subject: [PATCH 2/2] Proofread --- .../docs/refguide/modeling/domain-model/oql/oql-statements.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md b/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md index 33f12a88110..b3321811cc2 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/oql-statements.md @@ -94,9 +94,9 @@ SET ``` {{% alert color="info" %}} -Updating attributes was introduced in Mendix 11.3 +Updating attributes was introduced in Mendix 11.3. -Updating associations was added in Mendix 11.4 +Updating associations was added in Mendix 11.4. {{% /alert %}} ### OQL `UPDATE` Limitations