I have a table MessageStatus which has two relationship columns - contactID and campaignID.
when I make the following call it save the record but does not save my relationship
messageStatus = Backendless.Data.of( MessageStatus.class ).save( ms );
so, I added the following but do not know how to pass the relationship
int status = Backendless.Data.of(MessageStatus.class).addRelation(“campaignID”,campaignID ,campaignID);
I have two of these relationships (campaignID and contactID).
Can you please provide some example?
my application id 94496922-170D-4236-FF64-228CA5F5DE00
Thanks
The only way to save both an object and the relationship is by using the deepSave API:
https://backendless.com/docs/android/data_deepsaveoverview.html
As for the addRelation call, the signature is documented here:
https://backendless.com/docs/android/data_add_relation_with_objects_android.html
The first argument must be either a Map or an object of a class representing the table record.
Regards,
Mark