Hi according to the ember ds 1.13 release docs:
If your app is using the vanilla JSONSerializer or RESTSerializer, you will not have to make any changes, and your app will continue to work. The existing serializers have been updated in a backwards compatible way to return JSON API data to the store.
Currently I am the default RESTAdapter:
export default DS.RESTAdapter.extend({
host: 'http://localhost:9990',
namespace: 'api/v1'
});
Which has a custom serailzer for the model:
export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {
attrs: {
comments: { embedded: 'always' }
}
});
When I attempt to use the new queryRecord method:
this.store.queryRecord('discussion',{ titleid: self.get('title_id')});
I get the following exception in the logs:
Error while processing route: title.index Assertion Failed: You tried to make a query but your adapter does not implement `queryRecord` Error: Assertion Failed: You tried to make a query but your adapter does not implement `queryRecord`
at new Error (native)
at Error.EmberError (http://localhost:4200/assets/vendor.js:25705:21)
at Object._emberMetalCore.default.assert (http://localhost:4200/assets/vendor.js:15895:13)
at ember$data$lib$system$store$$Service.extend.queryRecord (http://localhost:4200/assets/vendor.js:80502:15)
at loadDiscussionModel (http://localhost:4200/assets/ui.js:2728:32)
at renderTemplate (http://localhost:4200/assets/ui.js:2715:12)
at _emberRuntimeSystemObject.default.extend.setup (http://localhost:4200/assets/vendor.js:37282:14)
at Object.callHook (http://localhost:4200/assets/vendor.js:65078:38)
at handlerEnteredOrUpdated (http://localhost:4200/assets/vendor.js:63868:12)
at setupContexts (http://localhost:4200/assets/vendor.js:63836:9)
serializer/application.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
serialize: function(record) {
return this._super(record, {includeId: true});
},
isNewSerializerAPI: true
});
isNewSerializerAPI: truein your application serializer?