title: Abstract entities and inheritance in Core Data
body: <p>I have a data model for Formula 1 races with 3 entities:</p>
  
  <ul>
  <li>RacingActor: Abstract entity</li>
  <li>Pilot: inherits from RacingActor</li>
  <li>Team: inherits from RacingActor</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/jwREq.png" alt="enter image description here"></p>
  
  <p>If I generate <code>NSManagedObject</code> subclasses to represent these entities, the code generated doesn't represent at all this design:</p>
  
  <ul>
  <li>Everything inherits from <code>NSManagedObject</code></li>
  <li>Nothing prevents me from instantiating RacingActor</li>
  <li>The team property in Pilot is of type <code>NSManagedObject</code> instead of Team</li>
  </ul>
  
  <p>Is this the expected behaviour? Am I supposed to fix the code generated by Xcode? Am I missing something?</p>
  
  <p>BTW, I'm using Xcode 4.3.3</p>