Item won't get created for child of table using REST in Backendless 4.0

I am trying to create an element as a child of a specific table. For example, I have a Restaurant Menu, I am trying to create a Menu Item. The Restaurant table has a 1 to many relationship with this Menu Item table.

I am using the REST API and the same syntax as the 3.0 version of backendless but it is not working in 4.0. I am trying to do this in the Rest Console as well and it is also not working. I assume it is something to do with my parameters but I am just copying and pasting the parameters from the get call and modifying them as I need to create a new element. See below.

Do we need to make two calls with 4.0 to do this? First to create the element in the FeedContentCard table and then to attach the relationship from the retailer table to the feedcontentcard table?

Method: .put
URL: https://api.backendless.com//<REST-api-key>/data/RetailerPage/<object-id>

Here are my parameters. Basically we are creating a new element in the FeedContentCard table that is a child of the RetailerPage table. In the return, we only see “contentCards”: null, when we do this but it should have the below parameters in the return.

{"contentCards": [ 
{ "offerDescription": "hi", 
"___class": "FeedContentCard" 
} ] 
}

Did you read the documentation for 4.0? I think you were asking about a side by side comparison between the versions. There is one for REST:
https://backendless.com/docs/rest/doc.html#version_differences

The same request you used to make in 3.x will not work in 4.0 - relations are created differently. Read the doc for more details.

Mark

Perfect. I just saw that. Thanks for the help!

I think this would be a great feature to add so we don’t have to make two calls if that is possible.