** Edit : sorry I had to edit my question to clean out the other users i had so i delete everything.
so i manage to make some kind of relation between two users in one table on parse, this is how it's look :
my class is NewChat and the user 'XcnKqF0tmO' is my Current user.
i'm trying to create an query to receive a text ( the text is : hello) from another class called phoneNumber :
as you can see the receiver 'T9kDJwePc' (on the first picture) is the same user 'ZZ6mRK..' (on the second picture. what i'm trying to do is to create a query from the Sender 'XcnKqf0tmO' (1st picture) to the T9kPDJwePc who is actually ( if i click on the reciever name ) is ZZ6MRKr5J1 and get the text " hello " into my TextField. I tried the following combination which didn't work :
PFQuery *newOne = [PFQuery queryWithClassName:@"NewChat"];
// [newOne includeKey:@"reciever"]; <--- i tried with this line and with it
[newOne whereKey:@"sender" equalTo:[PFUser currentUser]];
PFQuery *phoneNumber = [PFQuery queryWithClassName:@"phoneNumber"];
[phoneNumber whereKey:@"objectId" matchesKey:@"reciever" inQuery:newOne];
[phoneNumber findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
NSLog(@" object %@", objects);
}];
my query return with no result , my NSLOG show : " object ( ) ". why I have no results ? since the receiver name on the first image and the object ID on the second image are equal...