Closed moldovanpeter89 closed 1 year ago
Hi @moldovanpeter89
I can reproduce your issue using our Java compatibility example: https://github.com/realm/realm-kotlin/tree/main/examples/realm-java-compatibility
It looks like it is an issue with us not handling RealmObject()
correctly. I will be looking for a fix.
A workaround you can use until a fix is ready is to change open class Checklist : RealmObject()
to open class Checklist : RealmModel
.
Note, that while we do support using both SDK's in the same app. Having both of them operating on the same file is not recommended.
The reason for this is that we are using some internal files to control access to the underlying file and if two SDK's do not agree on the exact layout for these files, it can potentially corrupt the file. And in your case Realm Kotlin 1.6.0 uses Realm Core 13.2.0, while Realm Java 10.11.1 uses Realm Core 12.3.0.
@cmelchior Thank you for the clarifications!
A fix has been merged and is available in a 1.6.2-SNAPSHOT
: https://github.com/realm/realm-kotlin#using-snapshots
Hello,
We have a situation that we are facing, we are trying to migrate our Android application from realm-java to realm-kotlin, but there are 2 issues that we can't find information about, so I created a new project to showcase the errors:
Using the realm-kotlin for this
Using the realm-java for this
The compilation error:
I read the documentation and the article about the migration but somehow it lacks a real-life use case or it's not that explicit for everyone and what strategy could be applied:
We are trying to migrate to KMM to extract the data layer from the apps (android/iOS), currently only testing the waters in the android side but I assume this will be the case for iOS with realm-swift..
The realm version that were used: