title: extjs 5 store sync on binding to selection hasMany
body: <p><strong>How to get a store which is bound and filterd a viewModel.hasMany relationship synced?</strong></p>
  
  <p>I do have two grid panels in extjs5. say the first grid is groups and the second users. I bound the groups grid to viewModel stores.groups. This groups store is working and also syncing through the the models proxy (model is bound in the viewModel). The second grid is bound to the same viewModel through <code>bind:{groupsReference.selection.users}</code>. The binding works. On selection of a group the users are filtered. Changing some User data marks the user record as dirty. </p>
  
  <p>The Problem: Dirty Users are not autoSynced any more, nor am I able to figure out how to sync it manually.  How can I get autoSynced working here? How can I trigger a manual sync?</p>
  
  <p>The models for groups for users are identical except the hasMany/belongsTo relationship: </p>
  
  <pre><code>Ext.define('MyApp.model.Groups', {
      extend: 'Ext.data.Model',
  
      fields: [
          { name: 'id', type: 'int' },
          { name: 'groupname', type: 'auto' }
      ],
      autoLoad: true,
      autoSync: true,
      proxy: {
          type: 'rest',
          url: '/api/groups',
          reader: {
              type: 'json',
              rootProperty: 'data',
              successProperty: 'success'
          },
          writer: {
              type: 'json'
          }
      },
      hasMany: {
          model: 'MyApp.model.Users',
          store:'MyApp.model.Users',
          name: 'users',
          foreignKey:'testId',
      }
  });
  </code></pre>
  
  <p>And the view Model</p>
  
  <pre><code>Ext.define('MyApp.view.main.MainModel', {
      extend: 'Ext.app.ViewModel',
      requires: ['MyApp.model.Groups','MyApp.model.Users'],
      alias: 'viewmodel.main',
      stores: {
          groups: {
              model: 'mfct.model.Experiment',
              autoLoad:true,
              autoSync:true
          },
          users: {
              model: 'mfct.model.Variation',
              autoLoad:true,
              autoSync:true
          }
      }
  
  });
  </code></pre>