title: How to access fields inside a model
body: <p>I´m using Sencha Touch 2 and have defined a model like this:</p>
  
  <pre><code>Ext.define('csx.model.Profile', {
   extend: 'Ext.data.Model',
  
   config: {
      fields: [
          {name: 'firstname',type: 'string'},
          {name: 'lastname', type: 'string'},
      ],
  
      hasMany: [
          {model: 'Telephone', name: 'telephones'},
          {model: 'Email', name: 'emails'},
      ],
   },
  
   doSomething: function () {
      var firstname = this.get('firstname'); //returns null
      var phones = this.telephones(); // throws a TypeError
  },
  
  });
  </code></pre>
  
  <p>Inside my function <code>doSomething</code> I am trying to access the values of the model and the  models associated with the <code>hasMany</code> property. The <code>get</code>function only returns null and when I try to access the associated models I only get a TypeError saying that the object doesn´t have a telephones function. But when I look at the Sencha Touch 2 guides <a href="http://docs.sencha.com/touch/2-0/#!/guide/models" rel="nofollow">UsingModels</a> on how to use models it says that the <code>hasMany</code> associations are accessible trough a function resembling the name I specified (telephones). </p>
  
  <p>So how do I access the field values and the associated models inside a model instead?</p>