{"action":"closed","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/1252","labels_url":"https://api.github.com/repos/realm/realm-java/issues/1252/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/1252/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/1252/events","html_url":"https://github.com/realm/realm-java/issues/1252","id":92048308,"number":1252,"title":"io.realm.exceptions.RealmException: class X is not part of the schema for this Realm.","user":{"login":"stephen1706","id":6417115,"avatar_url":"https://avatars.githubusercontent.com/u/6417115?v=3","gravatar_id":"","url":"https://api.github.com/users/stephen1706","html_url":"https://github.com/stephen1706","followers_url":"https://api.github.com/users/stephen1706/followers","following_url":"https://api.github.com/users/stephen1706/following{/other_user}","gists_url":"https://api.github.com/users/stephen1706/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen1706/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen1706/subscriptions","organizations_url":"https://api.github.com/users/stephen1706/orgs","repos_url":"https://api.github.com/users/stephen1706/repos","events_url":"https://api.github.com/users/stephen1706/events{/privacy}","received_events_url":"https://api.github.com/users/stephen1706/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-30T09:57:42Z","updated_at":"2015-06-30T10:21:15Z","closed_at":"2015-06-30T10:21:15Z","body":"X is the class that extends RealmObject. the apps crash and show this error when I was trying to query. it seems my database migration isn't perfect. I use this for the migration, so every time I increment the realm version code, I expect the whole database will be remove and replace with the new structure.\r\n\r\n    private Realm getRealmInstance(Context context) {\r\n        RealmConfiguration realmConfig = new RealmConfiguration.Builder(context)\r\n                .name(Realm.DEFAULT_REALM_NAME)\r\n                .schemaVersion(REALM_VERSION_CODE)\r\n                .deleteRealmIfMigrationNeeded()\r\n                .build();\r\n\r\n        return Realm.getInstance(realmConfig);\r\n    }"}}