title: Ember.js: getting model relationships from component's javascript
body: <p>I am building a component, and I have noticed a behaviour that seems very odd to me. My component is invoked as follows:</p>
  
  <pre><code>{{my-component model=model}}
  </code></pre>
  
  <p>My model contains a relationship as follows:</p>
  
  <pre><code>type: DS.belongsTo('type')
  </code></pre>
  
  <p>Now, in <code>my-component.js</code>, if I log to console <code>this.get('model.type.name')</code> (or <code>this.get('model').get('type').get('name')</code>), I get <code>undefined</code>. However, if in <code>my-component.hbs</code> I insert <code>{{model.type.name}}</code>, the value is displayed correctly.</p>
  
  <p>I don't really understand this behaviour: how can I access a model's relationship from within a component's javascript just like I do in the component's Handlebars template?</p>
  
  <p>Thanks!</p>