Class DS.FixtureAdapter

DS.FixtureAdapter is an adapter that loads records from memory. It's primarily used for development and testing. You can also use DS.FixtureAdapter while working on the API but is not ready to integrate yet. It is a fully functioning adapter. All CRUD methods are implemented. You can also implement query logic that a remote system would do. It's possible to develop your entire application with DS.FixtureAdapter.

For information on how to use the FixtureAdapter in your application please see the FixtureAdapter guide.

Show:

Module: ember-data

By default the store will try to coalesce all fetchRecord calls within the same runloop into as few requests as possible by calling groupRecordsForFindMany and passing it into a findMany call. You can opt out of this behaviour by either not implementing the findMany hook or by setting coalesceFindRequests to false.

Module: ember-data

If you would like your adapter to use a custom serializer you can set the defaultSerializer property to be the name of the custom serializer.

Note the defaultSerializer serializer has a lower priority than a model specific serializer (i.e. PostSerializer) or the application serializer.

app/adapters/django.js
import DS from 'ember-data';

export default DS.Adapter.extend({
  defaultSerializer: 'django'
});
Module: ember-data

By default the FixtureAdapter will simulate a wait of the latency milliseconds before resolving promises with the fixture values. This behavior can be turned off via the simulateRemoteResponse property.

Module: ember-data

If simulateRemoteResponse is true the FixtureAdapter will wait a number of milliseconds before resolving promises with the fixture values. The wait time can be configured via the latency property.