领域,复杂的链接查询 [英] Realm, complex linked query
问题描述
在官方文档中, https://realm.io/docs/java/latest/#link-queries -有一个示例,介绍了如何选择布朗蓬松"狗的主人.
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)
我看不出如何通过使用.not().beginGroup().equalTo(...).equalTo(...).endGroup()
来获得这一结果(具有SQL经验的人会尝试使用此方法)
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)
非常感谢!
推荐答案
您尝试过
.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.
这篇关于领域,复杂的链接查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!