At the moment of this question i'm running the latest Ember and Ember Data versions.
I'm working with the DS.RESTAdapter calling for a /places
this way:
this.store.findAll('place');
The model only have a name attribute name: DS.attr('string')
The JSON is the following:
{
places: [
{
id: 1,
name: "San Francisco"
},
{
id: 2,
name: "Havana"
}
]
}
I made the template and with the corresponding each
and everything shows up and works so far but i get a deprecation warnings that tells the following:
DEPRECATION: The default behavior of shouldReloadAll will change in Ember Data 2.0 to always return false when there is at least one "destination" record in the store. If you would like to preserve the current behavior please override shouldReloadAll in your adapter:application and return true.
I don't know exactly what's the best approach to solve this warning. I'm new to ember so any further explanation will be fine. Thanks in advance.
To comply with the new default behavior, override shouldReloadAll
like this:
function shouldReloadAll( store, snapshot ) {
return !store.peekAll( snapshot.type.modelName ).length
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With