I’m building a simple ToDo application to experiment with EmberData and I’m stuck loading data from an API through a hasMany relationship using the RESTadapter.
The resulting UI is a list of projects with the tasks.length always 0. There isn’t an XHR to load the tasks, so I must be missing something which triggers that hasMany relationship to populate.
@joshwalsh The response json format for hasMany records have changed between 0.13 and the 1.0 beta release. Instead of { projects: [ ... ,task_ids: [1, 2] ] } you need { projects: [ ... , tasks: [1, 2] ] } and need to return the comments with those ids, too, in the response.
Thanks for that. I missed that change in the transitions guide. That alone wasn’t enough to fix it, but I was able to pull the serializer in from this project to fix the hasMany in Ember-Data beta 2: