Possible values: true and false.
Default value: false.
File: configuration file.
Context: DatabaseManager, Database.
If this parameter is set to true, the row will be written to the database when the update of another row occurs. This way all changes of the row will be accumulated and written together (operation called Aggregation). If parameter is set to true, the row will be written before every new query. If this parameter is set to false, or is not defined, no writing will be done until the transaction’s commit.
Modifications of single DO (row in table) are optimized - aggregated at transaction level. Aggregation works for successive modifications of the same DO, provided no queries (in same transaction) were executed between them:
INSERT/UPDATE - update won't be executed, instead corrected INSERT is performed,
UPDATE/UPDATE - successive updates, result in one update execution only,
UPDATE/DELETE - update won't be executed, only DELETE is performed,
INSERT/DELETE - nothing is executed,
INSERT/UPDATE/DELETE - nothing is executed, because from scenario 1 first two produce one INSERT, and scenario 4 produces nothing.
Either query or modification of other DO stops aggregation for previous one. DO.delete() may execute cascade delete java code which runs queries, and these queries will stop aggregation of modifications for the first DO.
Sample code:
# values{true,false} default{false} DatabaseManager.defaults.AutoWrite=true