问题
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