Nested Include Parse.com

后端 未结 4 862
我在风中等你
我在风中等你 2021-01-21 01:48

I have a UserToMessage table which has a pointer to user called thisUser and a pointer to message called msg

The message tab

4条回答
  •  无人及你
    2021-01-21 02:28

    This will work.

    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
        ...
    }];
    

提交回复
热议问题