Best Practices for CRUD
Cross collection atomic operations are not currently supported with DQL. This work is actively in progress.
If your scenario requires cross collection atomic operations this is functionality is still available using the legacy query API methods. For more information see Batching Multiple Operations (Legacy)
The following snippet shows an example of the writeStrategy: insertDefaultIfAbsent parameter passed as an argument to theupsert method:
For example, use DispatchQueue.global, as follows: