First of all, thanks to everybody for their work on ember.
I’ve some questions here, and I’m not complaining at all
In this commit @tomdale removed isLoaded store alias : Remove isLoaded store alias · emberjs/data@efe6d20 · GitHub
@sly7_7 and @tchak seems worried about it to.
In this issue I exposed a use case and @pwagenet asked me to start a new topic here : isLoaded store alias was useful with websockets · Issue #1018 · emberjs/data · GitHub
Here it is :
I think isLoaded store alias deserve to be available, particulary in the following use case.
I’m building an app that displays data that can be updated through websockets, but I don’t manage update the same way if the updated model is already loaded or not. :
App.socket.on('updateIssue', function (issueId) {
if (App.Issue.isLoaded(issueId)) {
//do this
}
else {
//do that, eventually App.Issue.find(issueId)...
}
});
But maybe isLoaded alias is planned to be back ? And also, maybe my approach is wrong…
So the main questions here are :
- Why has been the alias removed, and why can’t it be back ?
- Is my approach right, and how can I get the same pattern without isLoaded alias (and without add it myself to ember-data).