title: iPhone core data inserting new objects
body: <p>I have been reading through the core data documentation and feel I am still missing something.</p>
  
  <p>I do not quite understand how you insert objects into a relationship of another object.</p>
  
  <p>For example the following two Entities are in my model</p>
  
  <pre><code>flightDepartureBoard
   name: 
   from_airport:
   to_airport:
   current_flights: (this is a one to many relationship of flight detail entities)
  
  flight_details
   arrive
   depart
   name
  </code></pre>
  
  <p>So my data contains a list of different departure boards for a few airports.  Each departure board then contains a number of flight_details containing info on the current arrivals and departures for that airport.</p>
  
  <p>My current understanding is to insert the flight details for a specific departure board, I must get the managedObject for the board, then create a new managed object for each flight and set its values as appropriate then create an NSSet conatining the flight managed objects and set the depatureboards managedObject current_flights (the relationship) to the just created NSSet.  Is this correct?</p>
  
  <p>What if I want to add new entries?  I assume I do not need to fetch the entire set first?</p>
  
  <p>Thanks for any help..</p>
  
  <hr>
  
  <p>Although I just realised I could set the relationship to the current object on the flightDetails object instead..</p>