嵌套包括Parse.com [英] Nested Include Parse.com
本文介绍了嵌套包括Parse.com的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 UserToMessage
表,其中有一个指向用户的指针,名为 thisUser
,并指向一个名为<$的消息指针c $ c> msg
I have a UserToMessage
table which has a pointer to user called thisUser
and a pointer to message called msg
消息表
有一个指向用户的指针创建者
。当我查询 UserToMessage
我 [includeKey:@message]
The message table
has a pointer to user called creator
. When I query UserToMessage
I [includeKey:@"message"]
我还想 [includeKey:@creator]
以某种方式......
I also want to [includeKey:@"creator"]
somehow...
推荐答案
这将有效。
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文