Q:

Core Data Relationship Saving

I am trying to figure out how to use Core Data with relationships.  I have used Core Data before, but only the very basics sans relationships (which worked for my needs at the time). 

I have a Trip entity that can have many Nodes.  When the user presses a "Start" button, I want to initialize the Trip entity and start storing all of the Nodes inside of that Trip, and then when the user presses a "Stop" button, I want it to calculate all of the Trip attributes and store it all together.  How do I save with respect to these entities?  

A:

Generate the MO subclasses using the IDE, it will create methods for setting the nodesInTrip and tripsInNode relationships.