Join Simon Allardice for an in-depth discussion in this video Creating a drilldown application using multiple entities, part of Core Data for iOS and OS X.
Now let's start working with related data both To-One and To-Many Relationships.…I've got a simple project here, and what I've done in the data model is I've created this…Course entity that now just has title and releaseDate, and I've split Author out into its own entity.…It would be fine if all I was interested in was the author name for each course, but if…I also want the phone and the email and the bio, I don't want to have to repeat that information…along with the course every single time. So I have got these two entities.…
I haven't created a relationship between the two, so let's do that now.…First, I'm going to create the simple relationship between Course to Author, so I'll switch back…into the normal table style, make sure that the Course entity is selected, click the plus…button, and I am going to call this author, we are going from Course to Author, each Course has one Author.…Now the other way around going from Author to Course, click the plus button, this time…one author could have multiple courses.…
- 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.