title: ExtJs and nested models
body: <p>Let's say I have a model called Vehicle</p>
  
  <pre><code>Ext.define('AM.model.Vehicle', {
      extend: 'Ext.data.Model',
      fields: [
          {name: 'brandId',  type: 'int'}, 
          {name: 'brandName',  type: 'string'},
          {name: 'modelId',  type: 'int'}, 
          {name: 'modelName',  type: 'string'},
          {name: 'yearOfRelease',  type: 'int'}
      ]
  
  });
  </code></pre>
  
  <p>As you can see, the vehicle model has fields "brandId", "brandName", etc.
  For example, I want to edit an instance of this model.
  I create an edit form, which has combobox linked to 'brandId' field.
  Then I save the form values to a model instance with this</p>
  
  <pre><code>values = form.getValues();
  record.set(values);
  </code></pre>
  
  <p>It all works fine, but there is a problem with all the fields that represent some outer models:
  only id's are updated, while all other fields, that depend on id remain the same.</p>
  
  <p>In a regular OOP language(Java for example), I would create a class CarBrand 
  and put an instance of this class inside the Vehicle class.
  In ExtJs 4 they have hasMany relationship, but don't have hasOne.</p>
  
  <p>What is the best approach in ExtJS 4 for such nested models?</p>