-
Task
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Since CAM-10409, the entity manager validates that the number of affected rows of an INSERT/DELETE/UPDATE statements is a valid value (context: some databases do not return this number, especially in the case of using jdbc batches). The process engine needs this number to implement optimistic locking. In case the result is not a valid number, it throws an exception suggesting that batch processing should be disabled.
This is not strictly needed for INSERT statements, because optimistic locking doesn't apply to it. E.g. on Postgres, we can use the connection property reWriteBatchedInserts, in which case INSERTs no longer return the number of affected rows, but DELETEs and UPDATEs still do, so the process engine should work fine with this setting.
The goal of this ticket is to remove the validation for INSERT statements.