title: How to map nested JSON into Sencha model with associations?
body: <p>The associated Sencha Touch model is not mapped from JSON and I have no idea what I'm missing.</p>
  
  <p><strong>Sencha Touch models</strong></p>
  
  <pre><code>Ext.define('MyApp.model.Station', {
    extend: 'Ext.data.Model',
  
    config: {
      fields: [
        'name',
        {name: 'lat', type: 'float'},
        {name: 'long', type: 'float'}
      ],
      hasMany: {model: 'MyApp.model.Forecast', name: 'forecast'}
    }
  });
  
  Ext.define('MyApp.model.Forecast', {
    extend: 'Ext.data.Model',
  
    config: {
      fields: [
        {name: 'date', type: 'date'},
        {name: 'sunshine', type: 'int'},
        {name: 'temperature', type: 'float'}
      ],
      belongsTo: 'MyApp.model.Station'
    }
  });
  </code></pre>
  
  <p><strong>JSON</strong></p>
  
  <pre><code>{
      "name": "some name",
      "lat": 11.5716,
      "long": 4.68715,
      "forecast": [
          {
              "date": "2013-09-20 13:00:00",
              "sunshine": "11"
          },
          {
              "date": "2013-09-20 14:00:00",
              "sunshine": "19"
          }
      ]
  }
  </code></pre>
  
  <p>The simple fields are mapped just fine but the <code>forecast</code> array remains undefined. If I remove the <code>Forecast</code> model completely and just declare <code>forecast</code> as a simple field (see the following code snippet) the mapping works as expected. Any ideas why?</p>
  
  <pre><code>Ext.define('SunApp.model.Station', {
    extend: 'Ext.data.Model',
  
    config: {
      fields: [
        'name',
        {name: 'lat', type: 'float'},
        {name: 'long', type: 'float'},
        'forecast'
      ]
    }
  });
  </code></pre>
  
  <p>Of course a working "solution" is better than nothing but the drawback is that I don't have a declared and thereby documented forecast model.</p>