Hi,
we have an application where we use Ember-data with the DS.RESTAdapter. We have a “widget” controller where we load data in the init() function.
First we had: this.content = App.ModelName.find()
to load al the data.
Now for 1.0 beta we changed this to
var that = this;
this.get('store').find('modelName').then(function(content) {
that.set('content', content);
});
This all works fine. But we have a socket connection where we push the identifiers of all objects that changed server site. In 0.13 we then could do this to (re)load the data for these objects and through the normal data binding all is updated.
var _object = App.ModelName.find(id);
if(_object._data) _object.reload(); # when data present force a reload from the server
But the find() functions on a object isn’t there anymore. So we are searching for a way to access the store and trigger a reload of the object. But I can not find a way to access the store from the outsite scope.
What is the best way to solve this?