O'Reilly logo

Cocoa Programming for Mac OS X, Third Edition by Aaron Hillegass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 30. Core Data Relationships

It is time to delve a bit deeper into Core Data. In Chapter 11, you dealt with a single entity (Car). In most applications, you will have multiple entities and relationships between them. Core Data supports to-one relationships and unordered to-many relationships.

This exercise will have two entities: Employee and Department. An employee will work for one department. A department will have a set of employees. A department will also have one employee (chosen from its set) who will be a manager. Thus, there are three relationships, as shown in Figure 30.1.

The Data Model

Figure 30.1. The Data Model

Edit the Model

In this section, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required