title: Reload from save() response with Ember-Data
body: <p>I'm currently using EmberJs along with Ember-Data to build an app backed by a Laravel JSON api.</p>
  
  <p>I got a little issue on the saving process, mostly on model creation.</p>
  
  <p>Here is my workflow :</p>
  
  <ol>
  <li>The Ember ObjectController saves itself <code>this.get("model").save()</code></li>
  <li>Laravel (REST api) receives the data and persist it, therefore
  creating a unique ID for it</li>
  <li>The api return the new data (that
  respect Ember convention) with the proper ID</li>
  <li>???? Ember-Data doesn't
  seems to care about the response since it does nothing...</li>
  </ol>
  
  <p>The problem here : the <code>id</code> remains undefined even if it has been given...</p>
  
  <p>The workaround I found is to reload models... but it's a big performance flaw considering that the data I want to be reloaded it available to Ember straight after the <code>save()</code></p>
  
  <p>any ideas ?</p>
  
  <p><em><strong></em> EDIT **</strong></p>
  
  <p>The problem only occurs on the first object that I add. When I repeat the process the next objects are refreshed correctly. If I hit refresh, it start again : the first object miss his refresh and the following are okay.</p>
  
  <p>Here my code about the add process :</p>
  
  <p><strong>route</strong></p>
  
  <pre><code>App.CategoriesNewRoute = Ember.Route.extend({
      model: function()
      {
          return this.store.createRecord("category").set("active", true);
      },
      setupController: function(ctrl, model)
      {
          ctrl.set("errors", 0);
          ctrl.set("model", model);
      }
  });
  </code></pre>
  
  <p>I don't have any Router for <code>CategoriesRoute</code> since the data is all in my ArrayController from the start.</p>
  
  <p><strong>controller</strong></p>
  
  <pre><code>App.CategoriesNewController = Ember.ObjectController.extend({
      needs: "application",
      actions:
      {
          save: function()
          {
              this.get("model").save();
              this.get("target").transitionTo("categories");    
          },
          cancel: function()
          {
              this.get("model").rollback();
              this.get("target").transitionTo("categories");
          }
      }
  });
  </code></pre>
  
  <p><em><strong></em> EDIT **</strong> 2
  I tried the code provided below with no success...</p>
  
  <p>I added 2 records, and the first don't have it's ID... the second got it, so the problem appears to only be on the first save...</p>
  
  <p>Here are the 2 responses I got from my API</p>
  
  <p>ObjectA</p>
  
  <pre><code>{"category":{"nameFr":"aaa","nameEn":"aaa","active":true,"id":10}}
  </code></pre>
  
  <p>ObjectB</p>
  
  <pre><code>{"category":{"nameFr":"bbb","nameEn":"bbb","active":true,"id":11}}
  </code></pre>