Skip to content

Instantly share code, notes, and snippets.

@SweeD
Created January 30, 2013 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SweeD/4671802 to your computer and use it in GitHub Desktop.
Save SweeD/4671802 to your computer and use it in GitHub Desktop.
I try to load hasMany associations embedded...what am I doing wrong?!
App.User = DS.Model.extend
#...
addresses: DS.hasMany(GleichklangWeb.Address, { embedded: true })
App.Address = DS.Model.extend
#...
user: DS.belongsTo(GleichklangWeb.User)
{
user: {
id: 669,
alias: 'ExampleUser',
//....
addresses: [
{
id: 111,
country_code: 'DE',
//....
},
{
id: 121,
country_code: 'DE',
//.....
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment