title: Ember.JS: Your server returned a hash with the key id but you have no mapping for it
body: <p>Consider this Ember JS Model:</p>
  
  <pre><code>App.User = DS.Model.extend({
      firstName: DS.attr('string')
  });
  </code></pre>
  
  <p>I am able to successfully save the model on the server using this as an XHR request:</p>
  
  <pre><code>{ 
     "user": {
       "first_name":"dude"
     }
  }
  </code></pre>
  
  <p>but for some reason it gives me an error while returning this XHR response:</p>
  
  <pre><code>{
      "id":1,
      "user":{
          "first_name":"dude"
      },
      "createdAt":"2013-04-12T03:13:52.382Z",
      "updatedAt":"2013-04-12T03:13:52.382Z"
  }
  </code></pre>
  
  <p>The error says: <strong><em>Your server returned a hash with the key id but you have no mapping for it</em></strong></p>
  
  <p>Ember expects the output to look like:</p>
  
  <pre><code>{ 
     "user": {
       "id":1,
       "first_name":"dude",
       "createdAt":"2013-04-12T03:13:52.382Z",
       "updatedAt":"2013-04-12T03:13:52.382Z"
     }
  }
  </code></pre>
  
  <p>I think the problem lies in the request itself, but I'm not sure.
  Note that I'm using the Sails API as my backend.</p>