I have the object GroupRequest and Group on Parse.com. Each GroupRequest has a pointer to a Group object called "group". I have queried to obtain an array of GroupRequests, and now I am trying to display the "name" string property of each Group in the GroupRequests in that array on a table view.
However, I am running into trouble when I try to access [@"name"]. The program crashes and says:
"'NSInternalInconsistencyException', reason: 'Key "name" has no data. Call fetchIfNeeded before getting its value.'"
How can I access the group names properly? Below is the code I'm using to try to access the [@"name"] property:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"notificationCell" forIndexPath:indexPath];
self.pendingRequestBeingDisplayed = [self.pendingRequests objectAtIndex:indexPath.row];
self.tempGroup = self.pendingRequestBeingDisplayed[@"group"];
cell.textLabel.text = self.tempGroup[@"name"];
return cell;
}
self.pendingRequests is the array of GroupRequest Objects.