is Enable Undo Local Creation
Returns true if an optimization that deleting an entity that was created locally but not yet uploaded undoes the creation is enabled. More specifically, if enabled, the optimization will remove requests from the request queue so the backend never sees them.
**Additional Notes:**
1. 'enableUndoLocalCreation' is 'false' by default.
2. 'enableUndoLocalCreation' is different than 'enableRequestQueueOptimization'. The algorithm that 'enableRequestQueueOptimization' controls respects transaction boundaries and unmodifiable requests (see 'OfflineODataRequestOptions.unmodifiableRequest'). If 'enableUndoLocalCreation' is set to 'true', it does not matter whether the creates, updates and deletes are in different transactions or are unmodifiable, they will all be removed.
3. The algorithm will respect cascading deletes. That is, if a parent in a parent-child relationship is deleted, and this optimization is enabled, the algorithm will also ensure that requests for children that were also created and not yet uploaded will also be removed from the request queue. However, if deleting a locally created but not yet uploaded entity will cause an entity downloaded from the backend to be deleted (for example, if a cascading delete of the local entity causes a server entity to be deleted), the requests referencing the locally deleted entity will be sent to the backend to ensure the correct entities are deleted from the backend. If the application needs to guarantee requests creating and modifying a locally created entity are not sent to the backend, the application should use 'OfflineODataProvider.undoPendingChanges()'.
Consider the following examples:
1. Say you have created a new entity customer101 locally, updated it once and then deleted it. After performing these operations, you invoke upload(). Below is the operation sequence:
- Request #1: Create customer101 locally
- Request #2: Update customer101
- Request #3: Delete customer101
- Invoke upload()
Note that before invoking upload(), customer101 is not available (since it has been deleted) but request #1 to #3 are kept in the request queue.
If 'enableUndoLocalCreation' is 'false' (the default value), when calling upload(), request #1 to #3 will be sent to the backend. The entity customer101 will be created, updated then deleted in the backend.
If 'enableUndoLocalCreation' is 'true', when calling upload, the optimization will happen by removing request #1 to #3, therefore they would not be sent to the backend.
2. Say you have created a new entity customer101 locally, and then also create a related order101 where the relationship between customers and orders is "on delete cascade". Then customer101 is deleted before any operations are uploaded. Then upload() is invoked. Below is the operation sequence:
- Request #1: Create customer101 locally
- Request #2: Create order101 related to customer101 locally
- Request #3: Delete customer101
- Invoke upload()
If 'enableUndoLocalCreation' is 'false' (the default value), when calling upload(), request #1 to #3 will be sent to the backend.
If 'enableUndoLocalCreation' is 'true', when calling upload, the optimization will happen by removing request #1 to #3, therefore they would not be sent to the backend.
Return
true if the optimization is enabled.