java - Realm select by property of property -
i have 2 realmmodels
class shop{ private string name; private item item; } class item{ private int itemid; private string itemname; }
i want find shop has item itemid = 1
.
any ideas?
you can query across references (links) in realm. below should work:
realm.where(shop.class).equalto("item.itemid", 1).findfirst()
Comments
Post a Comment