title: Extjs 5, data model association & load nested data
body: <p>trying to make this work....</p>
  
  <p>I want to load nested data on two object model</p>
  
  <pre><code>Ext.application({
  name : 'MyApp',
  
  launch : function() {
  
  
      Ext.define('MyApp.model.Address', {
          extend: 'Ext.data.Model',
  
          entityName: 'Address',
  
          fields: [ 
  
              {
                  name: 'id',
                  type: 'int'
              },
              {
                  name: 'addressLine',
                  type: 'string'
              },
              {
                  name: 'city',
                  type: 'string'
              },
              {
                  name: 'created',
                  type: 'date',
                  dateFormat: 'time',
                  persist: false
              }
          ]
      });
  
  
      Ext.define('MyApp.model.User', {
          extend: 'Ext.data.Model',
  
          entityName: 'User',
  
          fields: [ 
              {
                  name: 'id',
                  type: 'int'
              },
              {
                  name: 'address',
                  reference: 'Address'
              },
              {
                  name: 'name',
                  type: 'string'
              },
              {
                  name: 'lastname',
                  type: 'string'
              },
              {
                  name: 'created',
                  type: 'date',
                  dateFormat: 'time',
                  persist: false
              }
          ]
      });
  
  
      var user = new MyApp.model.User({
          "id": 1,
          "name": "Pedro",
          "lastname": "Carbonell",
          "address": {
              "id": 1,
              "addressLine": "Bailen 22",
              "city": "Barcelona",
              "created": 1420668866000
          },
          "created": 1420668866000
      });        
  
      console.info(user);
      console.info(user.getAddress());
  
  }});
  </code></pre>
  
  <p>It's result on no error when created the user, but when I access to associated data via user.getAddress() it returned an exception:</p>
  
  <pre><code> Uncaught Error: The model ID configured in data ("[object Object]") has been rejected by the int field converter for the id fieldext-all-debug.js
  </code></pre>
  
  <p>Try to define proxy like memory or localstorage on model definitions, but the result it is the same.</p>
  
  <p>Ext fiddle: <a href="https://fiddle.sencha.com/#fiddle/h2d" rel="noreferrer">https://fiddle.sencha.com/#fiddle/h2d</a></p>
  
  <p>Any help will be appreciated!</p>