In my MessagePars table , I have a conversation field that appears pointeron Conversation(another table in my database).
To fulfill the request for Message, can I do:
PFQuery *messageQuery = [PFQuery queryWithClassName:@"Message"];
[messageQuery whereKey:@"conversation" equalTo:_conversation.objectid];
[messageQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
...
}];
or do I need to get a real PFObject * myConversation and use it ...
PFQuery *messageQuery = [PFQuery queryWithClassName:@"Message"];
[messageQuery whereKey:@"conversation" equalTo:myConversation];
[messageQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
...
}];
It seems that # 1 does not work, but # 2 does ... my question is how can I make # 1 work (i.e. use the PFObject id to query when I have a pointer field)
source
share