Realm, complex linked query

2019-08-27 10:56发布

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条回答
虎瘦雄心在
2楼-- · 2019-08-27 11:20

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.

查看更多
登录 后发表回答