title: Emberjs: cannot read property 'type' of undefined
body: <p>I have created a model in my ember app called ticket-stats:</p>
  
  <pre><code>import Model from 'ember-data/model';
  import attr from 'ember-data/attr';
  
  export default Model.extend({
  
      get_tickets_more: attr(),
      get_tickets: attr(),
      get_avg_tickets: attr()
  
  });
  </code></pre>
  
  <p>The data is pulled from JSON api:  <a href="http://domain.com/data/ticketStats?blah=blah" rel="nofollow">http://domain.com/data/ticketStats?blah=blah</a>...
  So i have added a special adapter for this model called ticket-stats:</p>
  
  <pre><code>import JSONAPIAdapter from 'ember-data/adapters/json-api';
  
  export default JSONAPIAdapter.extend({
  
      host: 'http://domain.com',
      namespace: 'data',
  
      pathForType: function(type) {
          return Ember.String.camelize(type);
      }
  });
  </code></pre>
  
  <p>I get the data for this model in route:</p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Route.extend({
  
      model () {
          var ticketData;
          this.store.query('ticket-stats', { teamID: 218, attUID: 'oc7569', useProd: 1})
                  .then(function(stats) { ticketData = stats; });
  
          return Ember.RSVP.hash({
              currentUser: this.currentUser,
              ticketStats: ticketData
          });
      }
  });
  </code></pre>
  
  <p>And, i get a TypeError: </p>
  
  <pre><code>ember.debug.js:32096 TypeError: Cannot read property 'type' of undefined
      at _pushInternalModel (store.js:1524)
      at push (store.js:1501)
      at finders.js:171
      at Object.Backburner.run (ember.debug.js:678)
      at _adapterRun (store.js:1733)
      at finders.js:168
      at tryCatch (ember.debug.js:53806)
      at invokeCallback (ember.debug.js:53821)
      at publish (ember.debug.js:53789)
      at ember.debug.js:32054onerrorDefault @ ember.debug.js:32096exports.default.trigger @ ember.debug.js:54476(anonymous function) @ ember.debug.js:55727Queue.invoke @ ember.debug.js:333Queue.flush @ ember.debug.js:397DeferredActionQueues.flush @ ember.debug.js:205Backburner.end @ ember.debug.js:560(anonymous function) @ ember.debug.js:1126
  </code></pre>
  
  <p>Any ideas as to why this is happening?  This error goes away when i remove the pathForType function in the adapter, but then i get another error about getting the data from <a href="http://domain.com/data/ticket-stats" rel="nofollow">http://domain.com/data/ticket-stats</a>?...  which is not the correct URL.  I have to convert to camelCase, ticket-stats => ticketStats.</p>
  
  <p>This is what my json looks like:</p>
  
  <pre><code>{
     "get_avg_tickets": { ... },
     "get_tickets_more": { ... },
     "get_tickets": { ... }
  }
  </code></pre>
  
  <p>I also modified the application serializer by simply replacing JSONAPISerializer with JSONSerializer: app/serializers/application.js</p>
  
  <pre><code>import JSONSerializer from 'ember-data/serializers/json';
  
  export default JSONSerializer.extend({
  });
  </code></pre>
  
  <p>Any help would be appreciated!  I'm very new to Ember.</p>