0

Using Realm I'm running into some migration issues, even though I shouldn't have any. All migration is disabled:

RealmConfiguration config = new RealmConfiguration.Builder(dir)
    .deleteRealmIfMigrationNeeded()
    .build();

However, I removed a @PrimaryKey of a class, which didn't appear to change the Realm significantly, resulting in the non-deletion of the Realm. Unaware this didn't delete the Realm, I got exceptions regarding duplicate @PrimaryKey values. Since I did not have any PK in my new code, it took quite some digging to find this out.

Is this by design? If so, what is the preferred solution? I am currently using version 0.90.1.

jdepypere
  • 3,453
  • 6
  • 54
  • 84

1 Answers1

0

As mentioned in the comments, this appeared to be a bug in the version I was using (0.90.1). Using version 1.2.0, as beeender mentioned, fixed the issue.

Community
  • 1
  • 1
jdepypere
  • 3,453
  • 6
  • 54
  • 84