When I specify a a hasMany relation using the FixtureAdapter, the players array for each team won’t be populated unless I specify an array of id’s for the player like so
App.Team.FIXTURES = [
{id: 1, name: 'The Swagkings', players: [1,2,3,4]}
]
When the Team is setup like so
App.Team.FIXTURES = [
{id: 3, name: 'The Mississauga Bears'}
]
Then the teams player array isn’t automatically populated.
Furthermore, the reverse relationship isn’t set up (IE player’s team isn’t populated)
I have a sample app I wrote here to illustrate the problem http://jsfiddle.net/edude03/qCdAY/
While I can make it work by specifying the player IDs I feel like this is the wrong way to do it, especially considering that’s not how the data is returned from the backend.
What should I do to fix this issue?
This is currently a limitation of Ember Data. Specifically, at present, bidirectional links are not set up on data returned from the adapter at load time.
This is a very short-term limitation that we expect to have fixed soon.