Skip to Main Content
Xcode 5 Start to Finish: iOS and OS X Development
book

Xcode 5 Start to Finish: iOS and OS X Development

by Fritz Anderson
May 2014
Intermediate to advanced content levelIntermediate to advanced
624 pages
19h 43m
English
Addison-Wesley Professional
Content preview from Xcode 5 Start to Finish: iOS and OS X Development

Adding an Entity

The next step is to factor (database-savvy developers would say normalize) ownTeam out of Game and into a new entity, Team. Click on Passer Rating.xcdatamodel, and (using the skills you picked up in Chapter 9, “An iOS Application: Model”) create the Team entity, with one attribute, teamName. teamName should be a string, indexed, not optional, and with an obviously bogus default name like UNASSIGNED_NAME. Add a relationship, games, tracing to many of the Game entity; deletion should cascade.

Game can lose the ourTeam attribute, and gain team, a to-one relationship to Team, nullifying on delete. Be sure to set up this relationship as the inverse of Team’s games. When you’re done, the diagram view of the data model should look like ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Xcode 6 Start to Finish: iOS and OS X Development, Second Edition

Xcode 6 Start to Finish: iOS and OS X Development, Second Edition

Fritz Anderson
Objective-C for Absolute Beginners: iPhone, iPad and Mac Programming Made Easy

Objective-C for Absolute Beginners: iPhone, iPad and Mac Programming Made Easy

Stefan Kaczmarek, Brad Lees, Gary Bennett, Mitch Fisher

Publisher Resources

ISBN: 9780133751031Purchase book