title: Ember.js - HOWTO load a subclass data model into a superclass's route
body: <p>Is there a way to load a subclass data model into a superclass's route?</p>
  
  <p>As an example, I have a superclass named <code>Vehicle</code> and a subclass named <code>Car</code>.</p>
  
  <p>I have route like this: </p>
  
  <pre><code>/vehicle/21/edit
  </code></pre>
  
  <p>And in this instance, <code>Vehicle #21</code> is a <code>Car</code>. Accrodingly, my API returns the following payload data:</p>
  
  <pre><code>{"car": {/* lots of data */}}
  </code></pre>
  
  <p>When the route <code>vehicle.edit</code> tries to load this data, I get the following error:</p>
  
  <pre><code>Error while processing route: vehicle.edit payload.data is null
  </code></pre>
  
  <p>I can work around this by changing my API so that it uses <code>vehicle</code> as the root node in the JSON response, but I was wondering if Ember has a way to automatically cast a subclass into a superclass (e.g., load the <code>car</code> JSON response into a <code>Vehicle</code> instance).</p>
  
  <p>Thanks in advance!</p>