I am working on local RealmDB. In my application there are two collection
Drug
id drugName
1 abc
2 xyz
3 pqr
Pill
id pillName drugID
1 qqq 1
2 www 2
3 eee 1
4 ttt 2
5 rrr 2
6 fff 3
To get pills for any specific drug with some name… I need to write below code
let drugObject = realm.objects( Drug . self ).where{ $0.drugName == “ xyz ” }.first
let pills = realm.objects( Pill . self ).where{ $0. drugID == drugObject.id }
Instead of writing two queries here is there any way to combine into single query like join operation and get the result here?