When Realm handles multiple .realm files, Migration wants to view data from another realm file.

Asked 2 years ago, Updated 2 years ago, 51 views

If I have two files, default.realm and readonly.realm, how can I update them while referring to the data in readonly.realm during the default.realm migration?

android java realm

2022-09-29 22:03

1 Answers

I think the migration process is described in Migration.execute().
If you create a RealmConfiguration for readonly.realm and call Realm.getInstance() in that part, you can get a Realm instance for readonly.realm.

If this method doesn't work, it would be easier to answer if you could add a description of how it doesn't work.

There may be some problems with the old Realm Java version, but when I tried 0.84.1, I was able to get the Realm instance without any problems.


2022-09-29 22:03

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.