I have a Parse class "Posts". "Posts" has a column, "user" which stores the user that made the post. It is of type Pointer<_User>.
I want to be able to retrieve the user, and then get an image stored in the User class.
So far I have:
PFQuery *postQuery = [PFQuery queryWithClassName:@"Post"];
[postQuery includeKey:@"user"];
PFObject *result = [postQuery getFirstObject];
if (result) {
NSLog(@"successful query"); //Successful!
} else {
NSLog(@"unsuccessful query");
}
PFUser *user = result[@"user"];
if (user) {
NSLog(@"successful found user");
} else {
NSLog(@"unsuccessful found user"); //Not successful
}
I successfully get "result", but I no "user". What am I missing?