Skip to content

Commit

Permalink
Add backlinks to kmm-sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Melchior committed Aug 1, 2023
1 parent 926696d commit f144fc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/kmm-sample/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false

kotlin.mpp.stability.nowarn=true
kotlin.mpp.androidSourceSetLayoutVersion1.nowarn=true
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package io.realm.example.kmmsample

import io.realm.kotlin.ext.backlinks
import io.realm.kotlin.ext.realmListOf
import io.realm.kotlin.types.ObjectId
import io.realm.kotlin.types.RealmInstant
Expand Down Expand Up @@ -83,4 +84,7 @@ class AllTypes : RealmObject {
var objectIdRealmList: RealmList<ObjectId> = realmListOf(ObjectId.create())
var objectIdRealmListNullable: RealmList<ObjectId?> = realmListOf(null)
var objectRealmList: RealmList<AllTypes> = realmListOf()

// Special types
val parent by backlinks(AllTypes::objectField)
}

0 comments on commit f144fc1

Please sign in to comment.