android – How does an object of the kingdom of another object of the kingdom?

I have two kingdom objects, one is the reservation and the guest. Below are the examples of objects.

Open class booking: RealmObject () {
@ Primary key
var id: Int = 0
guest var: Guest? = null
}
guest open class: RealmObject () {
@ Primary key
var id: Int = 0
name var: String = ""
}

my need is based on the guest id, get the booking.below is my query example.

val booking = realm.where (). equalTo ("guest.id", "1"). findFirst ()

but it returns the null object. How to make the above scenario in kotlin android?