You are not logged in.
Pages: 1
Hello,
I am using mORMot 2 with SQLite3 and I need to perform 3 operations
atomically across different ORM classes:
- Add() to TInvoice
- Update() to TSupplier
- Add() to TShipment
I am using TRestBatch with nil class like this:
Batch := TRestBatch.Create(Rest.ORM, nil, 0);
Batch.Add(InvoiceItem, True);
Batch.Update(SupplierRec);
Batch.Add(ShipmentItem, True);
Rest.ORM.BatchSend(Batch);
My questions:
1. Is TRestBatch with nil class truly atomic across multiple tables?
2. Does BatchSend wrap everything in a single SQLite BEGIN/COMMIT transaction?
3. How long does it lock the DB for other concurrent users?
4. Is there a better approach for multi-table all-or-nothing operations?
Thank you
Pages: 1