Hello all,
I’m wondering if the EmbeddedRecordsMixin currently works with combining embedded and sideloaded relationships, using for example this (ActiveModelSerializer-ready) JSON:
{
home_planet: {
id: "1",
name: "Umber",
super_villain_ids: ["1"]
},
super_villains: [{
id: "1",
first_name: "Tom",
last_name: "Dale",
home_planet_id: "1",
evil_minions: [{
id: "1",
name: "Alex"
}]
}]
}
I’ve got a failing test here: https://github.com/tobymarsden/data/blob/master/packages/activemodel-adapter/tests/integration/embedded_records_mixin_test.js#L80-121
Failure:
1. okay
2. okay
3. Should load the embedded child
Expected:
1
Result:
0
4. Should load the embedded child
Expected:
"Alex"
Result:
undefined
But I’m not sure whether it’s that EmbeddedRecordsMixin doesn’t support this use case, or (quite probably) I haven’t set the test up correctly…?
Thanks!