I'm learning EmberJS and need some help.
I have two models: Catalog and CatalogCourses. Catalog has many CatalogCourses. I'm just trying to test this relationship with some fixtures.
When I load a record of Catalog the relationship fixtures (CatalogCourses) doesn't load. I've been stuck on this for a couple hours, and I think it should be simple to do this, so I'm asking for your help.
Here are the models:
App.Catalog = DS.Model.extend({
year: DS.attr('string'),
catalogCourses: DS.hasMany('catalog_course')
});
App.CatalogCourse = DS.Model.extend({
catalog: DS.belongsTo('catalog')
});
And here are the Fixtures:
App.Catalog.FIXTURES = [
{
id: 1,
year: '2014',
catalog_courses: [ 1 ]
}
];
App.CatalogCourse.FIXTURES = [
{
id: 1,
catalog: 1
}
];
And here is a Fiddle of me trying to simply list that relationship: http://jsfiddle.net/6Evrq/75/
I'm using ember v1.5.0, ember-data v1.0.0-beta.7, handlebars v1.3.0 and jQuery 1.11.0
I tried using the {async: true}
option aswell, but the problem persists.
Any thoughts?