Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions content/en/docs/refguide/runtime/optimistic-locking.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,30 @@ If a conflict is detected—meaning someone else has modified the data since you

You can decide whether optimistic locking is enabled or disabled for your app.

## Behavior of App with Optimistic Locking Disabled
### Support Status by App Type

Optimistic locking is supported in the following types of Mendix apps:

| App Type | Support Status | Lowest Supported Version |
| --- | --- | --- |
| Online | Supported | [Studio Pro 11.5](/releasenotes/studio-pro/11.5/) |
| Offline | Supported | [Studio Pro 11.11](/releasenotes/studio-pro/11.11/) |

Additional information on optimistic locking behavior:
* In online Mendix apps, ___
* In offline Mendix apps, offline changes are synchronized to the server without being blocked by optimistic locking version checks
Comment on lines +20 to +31
Copy link
Copy Markdown
Member

@arjenw arjenw May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: what if you would describe it as:

Support for Offline apps (Offline PWA and Native Mobile apps)

Optimistic locking is supported from Studio Pro 11.11. As data can live for a long time in offline apps, changes based on that data that are synchronized from offline apps to the Mendix Runtime Server are committed to the database without optimistic locking to avoid conflicts. As such, offline data synchronization may overwrite changes.

(feel free to improve this text further)


## App Behavior: Optimistic Locking Disabled

When two modifications are saved, they are applied in the order of processing. Only changed attributes are written to the database. This means that if the two commits change different attributes or associations of an object, the changes are not overwritten.

For example, if one user commits changes for `AttributeA` and `AttributeB` and another user commits changes for `AttributeB` and `AttributeC` for the same object, then both `AttributeA` and `AttributeC` are committed according to both users' changes. `AttributeB` is committed based on whichever change was committed later.

## Behavior of App with Optimistic Locking Enabled
## App Behavior: Optimistic Locking Enabled

The Mendix runtime implements optimistic locking by tracking the version of all objects using the attribute `MxObjectVersion` with type `Long`. Although the `MxObjectVersion` attribute is not write-protected, setting this value does not result in it being saved to the database. Its current value is compared with the value for the same object in the database.

### How to Enable and Use Optimistic Locking
### Enabling and Using Optimistic Locking

You can enable optimistic locking for your Mendix application in the `Runtime` tab in the **App Settings** dialog:

Expand Down