Hello. I have a big problem. Here is my ember-data schema:
App.WUser = DS.Model.extend({
list: DS.hasMany('App.User')
});
App.User = DS.Model.extend({
username: DS.attr('string'),
name: DS.attr('string'),
surname: DS.attr('string'),
user: DS.belongsTo('App.WUser')
});
I would populate my two tables using this JSON, from my server:
var obj = {
id: 0,
list: [
{id:0, username:'user_1',name:'Name1',surname:'Surname1'},
{id:1, username:'user_2',name:'Name2',surname:'Surname2'},
]
}
I cannot find the function loadMany. I tried using App.Store.loadMany( … ); or DS.Store.loadMany( … );
But it seems there are no method called loadMany…
I am using ember version: → Ember.VERSION : 1.0.0-rc.2 Ember data version: → Last commit: 57d6c01 (2013-03-18 11:27:29 -0700)
Thanks for replies!
Mattia
EDIT: however: should I user load() or loadMany() ? Thanks