In swift, there is Realm.beginWrite() and commitWrite(). Is there an equivalent for realm-java?

Hi folks.

I know in the Swift SDK, there’s two ways to write data to the realm:

  • Realm.write
  • Realm.beginWrite/commitWrite

However, I’m looking for the latter in the realm-java SDK. I have a scenario where I’m writing data to the realm in a transaction that’s spread across a bunch of methods, so it’s hard to coalesce them all into a single “executeTransactionAsync”.

Yes, there is Realm.beginTransaction and Realm.commitTransaction: Realm (Realm 10.10.1) and Realm (Realm 10.10.1)

1 Like

Thanks! I thought I looked through the docs for a “begin*” but apparently I missed it! :man_shrugging:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.