mercredi 24 juin 2015

Force Ember-Data to reload belongsTo/hasMany relationships on find

How can I tell ember-data to also reload the related entities?

When I run the the following for the second time it will nicely reload the posts, but will not reload the belongs/hasMany relationships (Which were loaded on the first time).

model: function() {
    return this.store.findAll('posts',{reload:true});
},

I know there are many scenarios where this is wanted, but in my scenario the related entities can have changed.

Implement a socket.io service notifiying me of changes isn't an option as I don't have enough control of the server.

Note: I'm on Ember 2.0.0 and Ember-Data Canary




Aucun commentaire:

Enregistrer un commentaire