I’m trying to add a new object to a table where some columns (instructors and class names) have a relation with other tables.
I’m facing some issues with adding a new object that sets the relation (eg. I want to add a schedule item that sets instructor A as the “instructor”, and class name A as the “class name”).
Here’s my JSON body:
{
"classStart": 1601298000000,
"zoomPW": "340073",
"classEnd": 1601301600000,
"created": 1599137953000,
"active": true,
"capacity": 20,
"zoomID": "865 7719 5468",
"classDuration": 60,
"zoomLink": "https://us02web.zoom.us/j/86577195468?pwd=R0Y1QW1RMitET2xieUJLb3FSV3c1dz09",
"className":
[
{
"___class":"classTypes",
"name":"Ashtanga Basics (Livestream)"
}
],
"instructor":
[
{
"___class":"instructors",
"name":"James"
}
]
}
Based on Backendless’s documentation and tutorials, it seems like the code above is correct, but somehow, the object created has its instructor and class name fields empty.
So I managed to create an object in the table, but the relation fields return empty.
I’ve followed the tutorial here https://backendless.com/how-to-add-objects-with-relations-using-rest-console/ but doesn’t seem to work for me.
Am I missing something?
Thank you so much in advance