In my app I have two models task and package. A package can contain multiple tasks and a single task can belongs to multiple packages. I currently have the models defined as:
App.Package = DS.Model.extend({
id: DS.attr('number'),
tasks: DS.hasMany('task', { async: true })
// other package properties
});
App.Task = DS.Model.extend({
id: DS.attr('number'),
// other task properties
});
Do I need to has a hasMany('package') relationship to App.Task? In the application the relationship is only defined at the package level - a task can be added to a package but a package cannot be added to a task.