Wrapping multiple client calls in a transaction

Ah I think I may have cracked it. My update logic is encapsulated within data modules which I instantiate as required, such as within a service function. When created, these data modules are creating a fresh service instance and potentially using a different connection.

I’ve come up with a system whereby I can instantiate these data modules but pass them the existing service instance to use, along with its connection, which should alleviate the issue. I’ll have a play with it and see if I can make it work.