You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
igorsantos07
changed the title
How do Array relations works?
How to use Array for the "one" in one-to-many relations?
Apr 27, 2015
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).The text was updated successfully, but these errors were encountered: