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?
-
Just do not commit your changes as far I knowaquarium_moose– aquarium_moose2016-08-31 14:48:55 +00:00Commented Aug 31, 2016 at 14:48
-
my object already in Realm, I can't do anything with object without write transactionAlexandr Kolesnik– Alexandr Kolesnik2016-08-31 16:26:42 +00:00Commented Aug 31, 2016 at 16:26
Add a comment
|
1 Answer
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.