You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`entity` is the entity whose objects are being updated.
83
+
*`entity` is the entity whose objects are being updated.
84
+
85
+
*`attribute` is an attribute of the entity that is being updated.
75
86
76
-
`attribute` is an attribute of the entity that is being updated. `association` is an association that is being updated. Multiple attributes and associations can be updated in the same statement. An attribute of type `autonumber` can not be updated. The `ID`field of an entity cannot be updated.
87
+
An attribute of type `autonumber` can not be updated. The `ID`attribute of an entity cannot be updated.
77
88
78
-
`expression` is a new value of an attribute or association. Any [OQL expression](/refguide/oql-expressions/)is allowed. When updating attributes, the value type of the expression should match the attribute type according to [type coercion precedence](/refguide/oql-expression-syntax/#type-coercion). When updating an enumeration attribute using a literal, the literal must be a valid value for the enumeration. When updating an enumeration attribute using another enumeration, the expression enumeration must be a subset of the attribute enumeration. When updating a string attribute using a string literal, the literal length must be equal to or less than the length of the attribute. In the case of associations, association and entity expressions must match the target association type. Values of type LONG can also be used as association values, but they must be valid ids of associations which are of the target association type.
89
+
*`association` is an association that is being updated. Associations can be updated in Mendix version 11.4.0 and above.
79
90
80
-
`condition` can be anything that can appear in an OQL [WHERE clause](/refguide/oql-clauses/#where).
91
+
Multiple attributes and associations can be updated in the same statement.
92
+
93
+
*`expression` is a new value of an attribute or association. Any [OQL expression](/refguide/oql-expressions/) is allowed.
94
+
95
+
* When updating attributes, the value type of the expression should match the attribute type according to [type coercion precedence](/refguide/oql-expression-syntax/#type-coercion).
96
+
* When updating an enumeration attribute using a literal, the literal must be a valid value for the enumeration.
97
+
* When updating an enumeration attribute using another enumeration, the expression enumeration must be a subset of the attribute enumeration.
98
+
* When updating a string attribute using a string literal, the literal length must be equal to or less than the length of the attribute.
99
+
* In the case of associations, association and entity expressions must match the target association type.
100
+
101
+
Values of type LONG can also be used as association values, but they must be valid ids of associations which are of the target association type.
102
+
103
+
*`condition` can be anything that can appear in an OQL [WHERE clause](/refguide/oql-clauses/#where).
81
104
82
105
Example:
83
106
@@ -141,40 +164,23 @@ SET
141
164
SpecializationAttribute =1
142
165
```
143
166
144
-
## Joins
145
-
146
-
You cannot directly join other entities in the `FROM` clause of OQL `DELETE` or in the `UPDATE` clause of OQL `UPDATE`. However, you can achieve the same result using long paths or subqueries. For example:
`entity` is the entity for which new objects will be created.
179
+
*`entity` is the entity for which new objects will be created.
174
180
175
-
`attribute` is an attribute of the entity that will be inserted.
181
+
*`attribute` is an attribute of the entity that will be inserted.
176
182
177
-
`oql-query` is any OQL query that returns same number of columns as the number of attributes that will be inserted.
183
+
*`oql-query` is any OQL query that returns same number of columns as the number of attributes that will be inserted.
178
184
This query can select data from persistable entities and/or [view entities](/refguide/view-entities/).
179
185
180
186
Example:
@@ -198,3 +204,26 @@ SELECT NewOrderNumber, Loader.TemporaryData_Customer/Loader.Customer/Number FROM
198
204
* Entity access rules are not applied to any OQL statements.
199
205
* No event handlers will be executed.
200
206
* Runtime and client state will not be updated with the changes.
207
+
208
+
### Joins
209
+
210
+
You cannot directly join other entities in the `FROM` clause of OQL `DELETE` or in the `UPDATE` clause of OQL `UPDATE`. However, you can achieve the same result using long paths or subqueries. For example:
0 commit comments