title: Overriding property setter in a class category
body: <p>I've got an <code>NSManagedObject</code> class that I want to override a setter to but I've been told it's good practice to not modify the automatically generated class file and create categories to instead extend them (because if you change the model and regenerate the file, you lose all your additions).</p>
  
  <p>If I make a method for the setter in a category, it definitely runs the method (tested with NSLog), but I don't know how to assign the actual property value. Normally, I'd synthesise the property using </p>
  
  <p><code>@synthesize finished = _finished;</code> </p>
  
  <p>so that I can access the property in the setter using <code>_finished</code>, like so:</p>
  
  <pre><code>- (void)setFinished:(NSNumber *)finishedValue {
      _finished = finishedValue;
      self.end_time = [NSDate date];
  }
  </code></pre>
  
  <p>but where the property is defined in the <code>NSManagedObject</code> this doesn't seem possible.</p>