3
Class_A結構解析的iOS
- 的objectID
- B_ID(這是一個具有值指針的objectID到B)
Class_B
- 的objectID
- C_ID(這是一個具有值指針的objectID至C)
- someParameterinB
Class_C
- 的objectID
- someParameterinC
我使用以下代碼來檢索;
PFQuery *query = [PFQuery queryWithClassName:@"Class_A"];
[query includeKey:@"b_ID"];
[query includeKey:@"Class_B.c_ID"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
// The find succeeded. The first 50 objects are available in object
self.myArray = [[NSArray alloc] initWithArray:objects];
} else {
// Log details of the failure
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
}];
現在,當談到在UITableViewCell中顯示,我使用下面的代碼:
PFObject *aObject = [self.myArray objectAtIndex:indexPath.row];
PFObject *bObject = [aObject objectForKey:@"b_ID"];
PFObject *cObject = [bObject objectForKey:@"c_ID"];
我得到的問題與CObject的。你能幫忙嗎?