I just discovered what I think is an issue, here is a default model:
@RealmClass
open class World(@PrimaryKey var id: String = "",
var trees: RealmList<Tree> = RealmList()) : RealmModel
@RealmClass
open class Tree(@PrimaryKey var id: String = "") : RealmModel {
@LinkingObjects("trees")
@Transient
val worlds: RealmResults<World>? = null
}
I'm using transient on the field worlds because I don't want it to be serialized by gson (nor deserialized).
Unfortunatelly, by doing so the linkingObjects doesn't work anymore (it returns null).
Do you think is a fixable bug or do you know a workaround ?