title: Sencha touch save new record and update id (key)
body: <p>For now I use this code to save new/exist record:</p>
  
  <pre><code>var values = this.getFrmDetails().getValues();
  var record = this.getFrmDetails().getRecord();
  var store  = Ext.getStore('usersStore');
  record.set(values);
  // Is this a new user?
  if (record.data.id==-1)
  {
      record.save();
      store.add(record);
  }
  store.load();
  this.getMainView().pop();
  </code></pre>
  
  <ul>
  <li><p>This code works fine, but it always saves &amp; loads the whole data again, I'm tracking records by <code>id</code> so when I add new record I pass: <code>-1</code> for id.</p></li>
  <li><p>If not using <code>store.load()</code>, the id will be always <code>-1</code> for new records till I reload my app.</p></li>
  </ul>
  
  <p>How can I update the new record with id which created at server side?</p>
  
  <ul>
  <li><p>I use REST proxy with PHP server side, MySQL database.</p></li>
  <li><p>By the way in Firebug I always see <code>PUT</code> for new/updated records. How can I make Sencha touch send <code>POST</code> only for new records and <code>PUT</code> for just updating existing one?</p></li>
  <li><p>I have <code>autosync=true</code> on store.</p></li>
  </ul>
  
  <p>Thank you</p>