Join Simon Allardice for an in-depth discussion in this video Modeling relationships, part of Core Data for iOS and OS X.
When you have more than one entity, you can add relationships between them as long as…that makes sense, of course. Not all entities need to be related to all other entities.…And by describing those relationships, when our application runs, our managed objects can…have references to the other managed objects they are related to, and those references are…taken care of by Core Data.…So I have a couple of entities I've just created in this simple sample project here, Book and Publisher.…And I have made these very straightforward as the point of this is simply to demo this model.…
I am not building a full application out of them.…Publisher has name, address, city, state. Book has author, title, publication date.…I want to describe the relationship between these.…There is currently no relationship.…I can look at them either in the Table Style or Graph Style, there is no link between the two.…But to describe a relationship, first I describe it in plain language.…For my application, what does this mean?…Well, let's say in my app, every book has a publisher, and a publisher may publish many…
- Understanding Core Data and object persistence frameworks
- Creating a Core Data project
- Exploring data modeling
- Creating entities, attributes, and relationships
- Creating managed objects
- Fetching in Core Data
- Implementing undo and redo support
- Creating a Core Data Cocoa app without code
- Responding to validation issues
- Converting store types
- Preloading default data
Skill Level Intermediate
Q: In the CoursesViewController.m file, I receive a message that the method dismissModalViewControllerAnimated is no longer supported by Apple. Is there a newer method to use?
A: You may have received the warning that a call to the dismissModalViewControllerAnimated: method is now deprecated.
This is a recently deprecated method, so the code _will_ continue to work using that call, but to remove the warning, change the code from:
to the current recommended version:
[self dismissViewControllerAnimated:YES completion:nil];
It should take care of that message.