title: xcode write integer to core-data
body: <p>I am trying to insert to an Entity in core-data.  There is two values that need to be written one is a string the other is an integer.  Here is the code;</p>
  
  <pre><code>   NSManagedObject *newCounter;
      newCounter = [NSEntityDescription insertNewObjectForEntityForName:@"SysCounters" inManagedObjectContext:context];
  
      [newCounter setValue:[NSNumber numberWithInt:i] forKey:@"counterValue"];
      [newCounter setValue:@"genID" forKey:@"counterID"];
      counterValue = 1000;
      NSError *error;
      [context save:&amp;error];
  </code></pre>
  
  <p>I should let you know that i is a valid integer that is calculated above.  It does save the "countValue"</p>