I'm trying to query all records from confessions class whose author is not [PFUser currentUser]... but only those that our [PFUser currentUser] didn't rate on in ratings class.
confessions class:

ratings class:

Basically, I want to connect these two queries into one (somehow):
// get all confessions from other users
PFQuery *qConfessions = [PFQuery queryWithClassName:@"confessions"];
[qConfessions whereKey:@"author" notEqualTo:[PFUser currentUser]];
// get all ratings from this user
PFQuery *qRatings = [PFQuery queryWithClassName:@"ratings"];
[qRatings whereKey:@"ratedBy" equalTo:[PFUser currentUser]];
// get all qConfessions that are not in qRatings.confession
// YOUR HELP HERE :)
If there is no easy way to achieve what I want, do you think I should change the model and how? Should I just fetch all the ratings and then somehow ignore all qConfessions that are equal to ratings.confession? Any help would be welcome. Thank you.
I've made a workaround by adding a
confessionIdfield toratingsclass on Parse and using the following code: