Alexandr Kolesnik
Alexandr Kolesnik

Reputation: 2204

Copy Realm object without adding to database

In my app the problem is that user can edit an object, but if user pressed "Cancel" I need to discard changes, if there any method to make local copy of realm object without adding it to RealmBase, or I should do all the copies manually?

Upvotes: 0

Views: 311

Answers (1)

Serhii Mamontov
Serhii Mamontov

Reputation: 4932

If your model doesn't have references to any other models or collection of objects, you can use this method to initialise new instance with values stored in Realm.

Upvotes: 1

Related Questions