4. Managed Object Model Expansion

Black holes are where God divided by zero.

Albert Einstein

In Chapter 3, “Managed Object Model Migration,” you learned how to manage a changing model with versioning, mappings, and migration techniques. This chapter exercises your newfound migration knowledge as it further introduces changes to the model. The topics expand beyond one or two entities with the introduction of relationships, and at the end of the chapter, entity inheritance. The implications of delete rules are discussed, along with the impact some of them can have on data validation.


Relationships link entities. Using relationships in the managed object model introduces a powerful means to connect logical areas of data represented ...

Get Learning Core Data for iOS with Swift: A Hands-On Guide to Building Core Data Applications, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.