When loading Ember data model objects with an existing JSON that is not an AJAX remote call, I need to make the following 2 calls:
App.store.load(App.Account, data);
var account = App.store.find(App.Account, data.id);
Is it impossible to create an object in one step, similar to calling setPropertiesan existing Ember object?
Also, how will this work to create a collection of Ember model objects? For instance:
var users = App.get('users');
App.store.loadMany(App.User, users);
this.set('content', App.store.findMany(App.User, users.mapProperty('id').uniq()));
The above seems to be wrong. How can I create these objects from existing JSON objects?
source
share