diff --git a/src/ParseObject.js b/src/ParseObject.js index a10999ff3..910805887 100644 --- a/src/ParseObject.js +++ b/src/ParseObject.js @@ -1640,6 +1640,9 @@ class ParseObject { if (options.hasOwnProperty('batchSize') && typeof options.batchSize === 'number') { destroyOptions.batchSize = options.batchSize; } + if (options.hasOwnProperty('transaction')) { + destroyOptions.transaction = options.transaction; + } return CoreManager.getObjectController().destroy( list, destroyOptions @@ -1681,6 +1684,9 @@ class ParseObject { if (options.hasOwnProperty('batchSize') && typeof options.batchSize === 'number') { saveOptions.batchSize = options.batchSize; } + if (options.hasOwnProperty('transaction')) { + saveOptions.transaction = options.transaction; + } return CoreManager.getObjectController().save( list, saveOptions diff --git a/src/RESTController.js b/src/RESTController.js index 392c8d4ce..b77557bff 100644 --- a/src/RESTController.js +++ b/src/RESTController.js @@ -21,6 +21,7 @@ export type RequestOptions = { batchSize?: number; include?: any; progress?: any; + transaction?: boolean; }; export type FullOptions = { @@ -30,6 +31,7 @@ export type FullOptions = { sessionToken?: string; installationId?: string; progress?: any; + transaction?: boolean; }; let XHR = null; @@ -230,6 +232,11 @@ const RESTController = { } } + const transaction = options.transaction; + if (transaction) { + payload.transaction = true; + } + if (CoreManager.get('FORCE_REVOCABLE_SESSION')) { payload._RevocableSession = '1'; }