I've tried to retrieve some data using ember-data. But there is just artists: undefined
when I look in the console the model object retrieved.
I don't understand why the association is not done, here is my code
MyApp.Track = DS.Model.extend
artists: DS.hasMany 'MyApp.Artist'
name: DS.attr 'string'
MyApp.Artist = DS.Model.extend
name: DS.attr 'string'
And there is the data should be loaded :
{
"track": {
"name": "Troublemaker",
"id": 74,
"artists": [
{
"artist": {
"name": "Taio Cruz"
}
}
]
}
}
I've got the name of the track but not the id
and the artists
data.
Thanks a lot for your help.