I do need to have vueReactive set as true on both sides of some relations. Have you looked any more into this? Any ideas where I should start with debugging?
]]>The only thing I can think of off the top of my head without seeing more code would be if the position is being created only in the front end, and not persisted somewhere that would assign it an id. That is, if you say const bossPosition = store.createRecord({ title: 'CEO' })
then bossPosition.id
will be undefined (until after a call to bossPosition.save()
resolves), so assigning bossEmployee.position_id = bossPosition.id
won’t actually do anything…
I’m having a small problem with a ‘belongsTo’ relationship if the object which it belongs to is not yet created when the object is created. i.e.
employee: belongsTo position
position: hasMany employee
If an employee is created before the position, the employee.position is forever ‘undefined’ and will not be reactive (or even found by jsData)
Any Ideas??? Thanks again
]]>