DS.Store#retrieveManagedInstance()

retrieveManagedInstance (modelName, name, fallbacks) Ember.Objectprivate Defined in addon/-private/system/store.js:2438 Retrieve a particular instance from the container cache. If not found, creates it and placing it in the cache. Enabled a store to manage local instances of adapters and serializers. Parameters: modelName String the object modelName name String the object name fallbacks Array the fallback objects to lookup if the lookup for modelName or 'application' fails R

DS.Store#recordWasError()

recordWasError (internalModel, error) private Defined in addon/-private/system/store.js:1785 This method is called once the promise returned by an adapter's createRecord, updateRecord or deleteRecord is rejected (with anything other than a DS.InvalidError). Parameters: internalModel InternalModel error Error

DS.Store#recordForId()

recordForId (modelName, id) DS.Modelprivate Defined in addon/-private/system/store.js:983 Returns id record for a given type and ID. If one isn't already loaded, it builds a new record and leaves it in the empty state. Parameters: modelName String id (String|Integer) Returns: DS.Model record

DS.Store#recordIsLoaded()

recordIsLoaded (modelName, id) Boolean Defined in addon/-private/system/store.js:1637 This method returns if a certain record is already loaded in the store. Use this function to know beforehand if a findRecord() will result in a request or that it will be a cache hit. Example store.recordIsLoaded('post', 1); // false store.findRecord('post', 1).then(function() { store.recordIsLoaded('post', 1); // true }); Parameters: modelName String id String Returns: Boolean

DS.Store#recordWasInvalid()

recordWasInvalid (internalModel, errors) private Defined in addon/-private/system/store.js:1771 This method is called once the promise returned by an adapter's createRecord, updateRecord or deleteRecord is rejected with a DS.InvalidError. Parameters: internalModel InternalModel errors Object

DS.Store#query()

query (modelName, query) Promise Defined in addon/-private/system/store.js:1076 Available since 1.13.0 This method delegates a query to the adapter. This is the one place where adapter-level semantics are exposed to the application. Exposing queries this way seems preferable to creating an abstract query language for all server-side queries, and then require all adapters to implement them. If you do something like this: store.query('person', { page: 1 }); The call made to the server, usin

DS.Store#queryRecord()

queryRecord (modelName, query) Promise Defined in addon/-private/system/store.js:1151 Available since 1.13.0 This method makes a request for one record, where the id is not known beforehand (if the id is known, use findRecord instead). This method can be used when it is certain that the server will return a single object for the primary data. Let's assume our API provides an endpoint for the currently logged in user via: // GET /api/current_user { user: { id: 1234, username: 'admi

DS.Store#pushPayload()

pushPayload (modelName, inputPayload) Defined in addon/-private/system/store.js:2197 Push some raw data into the store. This method can be used both to push in brand new records, as well as to update existing records. You can push in more than one type of object at once. All objects should be in the format expected by the serializer. app/serializers/application.js import DS from 'ember-data'; export default DS.ActiveModelSerializer; var pushData = { posts: [ { id: 1, post_title: "G

DS.Store#peekRecord()

peekRecord (modelName, id) DS.Model|null Defined in addon/-private/system/store.js:910 Available since 1.13.0 Get a record by a given type and ID without triggering a fetch. This method will synchronously return the record if it is available in the store, otherwise it will return null. A record is available if it has been fetched earlier, or pushed manually into the store. Note: This is an synchronous method and does not return a promise. var post = store.peekRecord('post', 1); post.get('i

DS.Store#peekAll()

peekAll (modelName) DS.RecordArray Defined in addon/-private/system/store.js:1473 Available since 1.13.0 This method returns a filtered array that contains all of the known records for a given type in the store. Note that because it's just a filter, the result will contain any locally created records of the type, however, it will not make a request to the backend to retrieve additional records. If you would like to request all the records from the backend please use store.findAll. Also note