Understanding the Data Service Conflicts
When performing a GeneTransactionalQuery, the optional parameter evaluateConflits activates conflict detection, and when a conflict between values is detected, the query changes are not persisted, the query returns a result containing the exhaustive list of conflicts.
To describe the conflict detection mechanism we have to define the different types of values field involved in a transactional query:
-
Remote Value: The remote value is the current value stored in the database, used as reference for conflict detection.
-
Local Value: The local value represents from the API consumer perspective, the current database value for a given field of an entity. The local value is considered outdated as soon as it is different from the Remote Value. Values conflict detection is only applied to provided field local value, so make sure to provide in the query all fields local value you want to evaluate for conflicts.
-
New Value: When performing a GeneTransactionalQuery, the new value is the value we want to set as the new remote value. As soon as the GeneTransactionalQuery is committed the New Value becomes the new Remote Value.
To enable conflict detection, the GeneTransactionalQuery has to provide local values of fields it is trying to update, which means that most of the conflict detections will only work when the local values are provided for conflict evaluation.
Depending on the changes that can be processed concurrently on any data, the type of conflict can be one of the following types:
-
FIELD_VALUE_CONFLICT: Field value conflict indicates that we are trying to update a field of an entity (table column) from a value that has changed to a new value.
-
UPDATING_DELETED_ROW: The GeneTransactionalQuery is trying to update one or more fields of an entity which has been deleted. This evaluation is based on the entity internal id.
-
DELETING_MODIFIED_ROW: The GeneTransactionalQuery is requesting to delete an entity (row) that has been modified.
When performing a GeneTransactionalQuery with conflicts evaluation through the web client, a Conflict Editor will automatically show up when a query triggers conflicts. The user will be able to resolve the conflicts and persist changes.
The Conflict editor shows conflicts by tables and allows the user to resolve conflicts by Keeping or Discarding changes. The following table describes the possible and default resolutions.
Conflict Editor

| Conflict Type | Available Resolutions | Default | Comment |
|---|---|---|---|
| FIELD_VALUE_CONFLICT | Keep/Discard | Keep | ... |
| DELETE_MODIFIED_ROW_CONFLICT | Keep/Discard | Keep | ... |
| UPDATE_DELETED_ROW_CONFLICT | Discard | Discard | Query may not contain enough data to resolve by keeping changes |