title: Ember errors "Uncaught TypeError: Cannot read property 'typeKey' of undefined " on model save
body: <p>My RESTAdapter config:</p>
  
  <pre><code>App.ApplicationAdapter = DS.RESTAdapter.extend
    namespace: '/api'
  </code></pre>
  
  <p>My model:</p>
  
  <pre><code>module.exports = App.Cat = DS.Model.extend
    name: DS.attr 'string'
    description: DS.attr 'string'
    picture: DS.attr 'string'
    location: DS.attr 'string'
    profileStyle: DS.attr 'string'
    created: DS.attr 'date'
  </code></pre>
  
  <p>My route:</p>
  
  <pre><code>Cat = require '../../models/cat'
  
  App.CatNewRoute = Em.Route.extend
    model: -&gt;
      @store.createRecord(Cat, {
        created: new Date()
      })
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>App.CatNewController = Em.ObjectController.extend
    actions:
      addCat: -&gt;
        console.log 'saving...'
        @get('model').save().then -&gt;
          console.log 'all done'
  </code></pre>
  
  <p>I've verified with the Ember inspector that my model has all the attributes that get assigned through a form on the template at the time of save (except for an id which is null - I think this is normal and Ember by default uses the ID assigned to a model by the server). Whenever I  save the model I get the error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'typeKey' of undefined 
  </code></pre>
  
  <p>This error occurs here in the ember data source code:</p>
  
  <pre><code>if (container) {
    adapter = container.lookup('adapter:' + type.typeKey) || container.lookup('adapter:application');
  } 
  </code></pre>
  
  <p>I'm using Ember-data 1.0.0 beta 3-2 and Ember 1.0.0-4. I've tried a few different versions of Ember data to the same effect.</p>
  
  <p>Close approximation in jsBin: <a href="http://jsbin.com/ixIqIjI/6/edit?html,js,console,output" rel="nofollow">http://jsbin.com/ixIqIjI/6/edit?html,js,console,output</a></p>
  
  <p>This jsBin also errors with the typeKey error.</p>