Rafael Vega
Rafael Vega

Reputation: 4645

How to force ember-data to re-load data for a record from the server

I'm fetching a list of records using App.store.findQuery and my custom adapter (very similar to the default REST adapter). This calls my servers /resources url and fetches an array of json hashes with only a few fields for each resource.

Later on, when users navigate to a "details" page, I want to get more data for a particular record from the server. When I call App.store.find (passing the record's id), I get back the original fetched record and the adapter's find method is not called.

How do I force the store to call the find method in the adapter when a record already exists? or what's the best way to first get a list of records with few fields and then get details for a particular record with many fields?

tks.

Upvotes: 3

Views: 1653

Answers (2)

Peter Wagenet
Peter Wagenet

Reputation: 5056

Ember Data now has support for calling reload on a model instance.

Upvotes: 0

ebryn
ebryn

Reputation: 4407

It doesn't look like that is supported right now.

You should file an issue on GitHub: https://github.com/emberjs/data/issues

Upvotes: 1

Related Questions