title: Unique values in Sencha Touch store
body: <p>I am developing a mobile app in Sencha Touch and have the need to store details of previous searches locally without duplication.</p>
  
  <p>The searching, storing and displaying works fine, however if I do the same search twice the entry gets duplicated in my store.</p>
  
  <p>I expected that the "id" of the store would do this but something seems wrong.  </p>
  
  <p>Here is the code for the store.</p>
  
  <pre><code>    Ext.regModel('sSaved', {
          fields: [
              {name: 'IDs',        type: 'int'},
              {name: 'Outward',        type: 'string'},
              {name: 'Return',        type: 'string'},
              {name: 'Pickup',        type: 'string'},
              {name: 'Destination',        type: 'string'}
          ],
          proxy: {
              type: 'localstorage',
              id:'IDs'
          }
      });             
  
      var savedJobs = new Ext.DataView({
          store: new Ext.data.Store({
              model: 'sSaved',
              storeId: 'allSaved'     
          }),
          tpl: new Ext.XTemplate(
              '&lt;tpl for="."&gt;',
                  '&lt;table class="item" style="margin:auto;"&gt;',
                      '&lt;tr&gt;&lt;td class="title"&gt;ID&lt;/td&gt;&lt;td&gt;{IDs}&lt;/td&gt;&lt;/tr&gt;',
                      '&lt;tr&gt;&lt;td class="title"&gt;Outward&lt;/td&gt;&lt;td&gt;{Outward}&lt;/td&gt;&lt;/tr&gt;',
                      '&lt;tr&gt;&lt;td class="title"&gt;Return&lt;/td&gt;&lt;td&gt;{Return}&lt;/td&gt;&lt;/tr&gt;',
                      '&lt;tr&gt;&lt;td class="title"&gt;Pickup&lt;/td&gt;&lt;td&gt;{Pickup}&lt;/td&gt;&lt;/tr&gt;',
                      '&lt;tr&gt;&lt;td class="title"&gt;Destination&lt;/td&gt;&lt;td&gt;{Destination}&lt;/td&gt;&lt;/tr&gt;',
                  '&lt;/table&gt;',
              '&lt;/tpl&gt;'
          ),
          itemSelector: "table.item",
          autoHeight:true,
          emptyText: 'No Saved Jobs',
          autoLoad: true
      });     
  </code></pre>
  
  <p>And the code which sets the store.</p>
  
  <pre><code>    var fetched = Ext.decode(result.responseText);
      var details = fetched.apiResponse.details;
      savedJobs.store.load();
      savedJobs.store.add({
          "IDs":details.ID, 
          "Outward":details.Outward,
          "Return":details.Return,
          "Pickup":details.Pickup,
          "Destination":details.Destination
      });
      savedJobs.store.sync();
  </code></pre>
  
  <p>I could work around this by somehow searching the store and checking whether the value exists before adding, however I'm sure there is a simpler method.</p>
  
  <p>If this search->check->add is the approach that's needed, what is the least resource intensive way?</p>