title: NSManaged Object Loop saving same row multiple times
body: <p>I'm trying to write data from an NSMutableArray into a core data table via an NSManagedObject for loop. It writes out the last record in the the array multiple times rather than writing out each of the distinct rows in the array. </p>
  
  <p>I've done a fast enumeration loop on the array to confirm it has multiple distinct rows.</p>
  
  <p>This is the current version of my code loop:</p>
  
  <pre><code>  //see if there were any matching rows from All_Game_Tips_List entity and of course there should be 
  if (fetchedObjectsForAttributes == nil) {
      // do nothing as user1 does not have a saved profile
      NSLog(@"error no matching rows found which sounds suspect");
  }
  else 
  {
      for (id object in fetchedObjectsForAttributes ) {
          NSLog(@"alltip_obj = %@", object);
  
      NSLog(@"found exactly %i matching alltip records",[fetchedObjectsForAttributes count]);                                                                                  
  
  //next need to write a couple of fields from the profile entity and some from All_Game_Tips_List entity to mytips table  but first need to get all needed attributes for an attribute (e.g. name, tminus, etc) for an attribute
  //then insert the new row
  NSManagedObjectContext *contextForMyTips = [appDelegate managedObjectContext];   
  
  
  NSManagedObject *myTipsFromAllTips = [NSEntityDescription
                                           insertNewObjectForEntityForName:@"My_Game_Tips_List" 
                                           inManagedObjectContext:contextForMyTips];
  NSLog(@"start wri to mytips");
  
  for (NSManagedObject *info in fetchedObjectsForAttributes) {
      [myTipsFromAllTips setValue:[info valueForKey:@"alltip_name"]               forKey:@"mytip_name"];
      [myTipsFromAllTips setValue:[info valueForKey:@"alltip_alert_msg"]          forKey:@"mytip_alert_msg"];
      [myTipsFromAllTips setValue:[info valueForKey:@"alltip_description"]        forKey:@"mytip_description"];
      [myTipsFromAllTips setValue:[info valueForKey:@"alltip_id"]                 forKey:@"mytip_id"];
      [myTipsFromAllTips setValue:[info valueForKey:@"alltip_tminus_amt"]         forKey:@"mytip_tminus_amt"];
      [myTipsFromAllTips setValue:[info valueForKey:@"alltip_impact_type"]        forKey:@"mytip_impact_type"];
  
  
  }    // end of for NSManagedObject loop
  
          //commit the insert
          if (![contextForMyTips save:&amp;error]) {
              NSLog(@"Whoops, couldn't save: %@", [error localizedDescription]);
          }
  }    // looping through id 
  
  }    // end of else
  </code></pre>
  
  <p>Thoughts on why it's stuck on the last record in the array?</p>