I was trying this
我正在尝试这个
PFQuery *allDealsQuery = [Deal query];
PFRelation *favoritedDealsRelation = [user objectForKey:@"favoritedDeals"];
PFQuery *favoritedDealsQuery = [favoritedDealsRelation query];
PFRelation *redeemedDealsRelation = [user objectForKey:@"redeemedDeals"];
PFQuery *redeemedDealsQuery = [redeemedDealsRelation query];
[allDealsQuery whereKey:@"objectId" doesNotMatchKey:@"objectId" inQuery:favoritedDealsQuery];
//Parse does not support more than 2 where queries???
[allDealsQuery whereKey:@"objectId" doesNotMatchKey:@"objectId" inQuery:redeemedDealsQuery];
[allDealsQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
onSuccess(objects);
}
else {
onError(error);
}
}];
PFQuery *allDeals