Firstly I have read the related issues on SO and none seem to help me.
I have 2 models, Foo and Bar. Foo has a property, bars, which hasMany Bar.
// FOO
export default DS.Model.extend({
name: attr('string'),
bars: hasMany('bar')
});
// BAR
export default DS.Model.extend({
name: attr('string')
foo: belongsTo('foo')
});
And the JSON payload:
{
"name": "Something",
"bars": [
{
"name": "something else"
},
{
"name": "another one"
}
]
}
I've been trying to figure this error out for a while but I am stuck.
Here is the jsbin. If you look in the browsers console (not the jsbin one) you can see the error.