Skip to content

Instantly share code, notes, and snippets.

@mikekatz
Created September 14, 2012 14:28
Show Gist options
  • Save mikekatz/3722237 to your computer and use it in GitHub Desktop.
Save mikekatz/3722237 to your computer and use it in GitHub Desktop.
Kinvey fetch entity with relationships
KCSCollection* books = [KCSCollection collectionFromString:@"books" ofClass:[Book class]];
KCSLinkedAppdataStore* store = [KCSLinkedAppdataStore storeWithCollection:books options:nil];
[store loadObjectWithId:@"HPBook6" withCompletionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil) {
Book* harryPotter = [objectsOrNil objectAtIndex:0];
Author* jRowling = harryPotter.author;
} withProgressBlock:^(NSArray *objects, double percentComplete) {
//show progress
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment