I have User
and GroupMember
Class with parse.
I have a added a User
pointer column in GroupMember
Class and wanted to fetch all users from User
Class but excluding which are present in GroupMember
Class relation.
I have User
and GroupMember
Class with parse.
I have a added a User
pointer column in GroupMember
Class and wanted to fetch all users from User
Class but excluding which are present in GroupMember
Class relation.
You have to make a two queries where You query all the users objectId
from GroupMember
s pointer column and then exclude those objects from the next query on User
class.
ParseQuery<ParseObject> a = ParseQuery.getQuery("GroupMember");
a.include("name of pointer column")
a.findInBackground(new FindCallback...); // get list of objects id with for each loop
//i.e. for (ParseObject o : list) String s = o.getParseObject("user_pointer_column").getObjectId();
//then add it to some list
ParseQuery<ParseObject> b = ParseQuery.getQuery("User");
b.whereNotContainedIn("objectId", list_of_ids);
Or the other way:
ParseQuery<ParseObject> a = ParseQuery.getQuery("User");
ParseQuery<ParseObject> b = ParseQuery.getQuery("GroupMember");
b.whereDoesNotMatchQuery("user_pointer_column", a);
b.findInBackground(new FindCallback...{...});