I have a Realm objects User, Session, HeartSession which has the following structure.
User {
UUID: String (primary key)
RealmList<Sessions> sessions
}
Session {
UUID: String (primary key)
RealmList<HeartSession> heart
}
HeartSession {
UUID:String (primary key)
}
I have specific User object. I need to access all the heart recordings associated with this particular user object? What is the best way to do so?
I have tried this Query,
val heartSearchQuery = user?.sessions?.where()?.isNotNull("heart")
But the above query does not return values correctly.