ember.js - Ember-data bootstrapping model objects -


when bootstrapping ember-data model objects existing json not remote ajax call, have make following 2 calls:

app.store.load(app.account, data); var account = app.store.find(app.account, data.id); 

is not possible create object in 1 step, similar calling setproperties on existing ember object?

also, how work creating collection of ember model objects? example:

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 wrong. how can create these objects existing json objects?

seems ok me, store.load* returns else model objects (loaded ids & clientids).

so far, think there no alternative.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -