Realm, complex linked query

徘徊边缘 提交于 2019-12-13 03:37:40

问题


in the official docs, https://realm.io/docs/java/latest/#link-queries - there's an example how to select owners of "Brown Fluffy" dogs.

My questions is, how do I select only those not having Brown Fluffy (and, obviously, those having no dogs at all)

I do not see how can one achieve this result by, say, using .not().beginGroup().equalTo(...).equalTo(...).endGroup() (that someone with previous SQL experience would try)

Thanks a lot in advance!


回答1:


Have you tried

.not().equalTo(...).findAll().where().not().equalTo(...).findAll();

?

Chaining link queries is a bit tricky, but if I understand correctly, that is what you should try.



来源:https://stackoverflow.com/questions/47338900/realm-complex-linked-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!