为什么不等功能不工作这个领域查询

时间:2018-04-14 05:20:21

标签: android realm realm-mobile-platform

由于某些原因,notEqualTo()函数无法正常工作,我必须在下面进行简单查询才能在Android应用程序中过滤搜索结果形式的本地域数据库。请参考下面的调试屏幕截图。

enter image description here

正如您在查询结果集中看到的那样,我们不应该得到一个代码等于" CMB"我在这做错了什么?

1 个答案:

答案 0 :(得分:1)

找到了解决方案。

data = realm
       .where(DestinationTable.class)
       .notEqualTo("code",otherSelectedAirport)
       .beginGroup()
       .like("country", newText+"*", Case.INSENSITIVE)
       .or()
       .like("label", newText+"*", Case.INSENSITIVE)
       .endGroup()
       .findAll();