Hi, there!
I’m trying to save a new record that have relationship with two existing records, is a new Device that have a pointer to the DeviceModel and to the User that it belongs (not the Owner).
When I save the record, all data is saved correctly except for the relationships. I’m getting the values from a html element and saving in a variable, then trying to save with this:
var objDevice = new Device( {
name: deviceNome,
serial: deviceSerial,
patrimony: devicePatrimonio,
model: deviceModel,
user: userId
});
Backendless.Persistence.of( Device ).save( objDevice );
Both deviceModel and userId variables values are their existing objectId.
What is the right way to save this data?
Regards,
Tiago Schmidt