本文介绍了嵌套包含 Parse.com的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 UserToMessage
表,它有一个名为 thisUser
的用户指针和一个名为 msg
I have a UserToMessage
table which has a pointer to user called thisUser
and a pointer to message called msg
message table
有一个指向用户的指针,称为 creator
.当我查询 UserToMessage
我[includeKey:@"message"]
The message table
has a pointer to user called creator
. When I query UserToMessage
I [includeKey:@"message"]
我也想[includeKey:@"creator"]
不知何故...
推荐答案
这会起作用.
PFQuery *query = [PFQuery queryWithClassName:@"UserToMessage"];
[query includeKey:@"msg"];
[query includeKey:@"msg.creator"];
// Add constraints on query
...
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if(error) return;
// Do action
...
}];
这篇关于嵌套包含 Parse.com的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!