clintjhill/ember-parse-adapter

How to use Array for the "one" in one-to-many relations?

Opened this issue · 0 comments

I have a model with a belongsTo relation, that in Parse is an Array column.

However, using model.set('column', [relationModel]) triggers an error: "Assertion Failed: You cannot add a 'undefined' record to the 'hypothesis.risk'. You can only add a 'item' record to this relationship."

I guess this happens because the belongsTo relation specify a model class, but how should we specify those instead? I wanted to use an Array column for a one-to-many relation, so it would load the "one" side instantly - instead of using Pointer, that would make a second request to get the "one" (this is advised in the parse docs).