Realm query with List

后端 未结 4 1434
-上瘾入骨i
-上瘾入骨i 2020-12-19 01:37

I\'m using realm to store my data on Android. Awesome framework! Now the only problem I\'m now having is:

I got a array list strings with id\'s of Countries in my da

4条回答
  •  渐次进展
    2020-12-19 02:23

    In latest version of Realm 7+, you can use anyOf to match a field against a list of values.

    anyOf("name", new String[]{"Jill", "William", "Trillian"})
    

    in older versions, use in instead of anyOf and with kotlin use oneOf instead of in.

    see this issue

提交回复
热议问题