In an “Add operations to transaction” block I do an upsert operation for each of my two entities and then I do a set relation using the upsert operations reference but I get the following error:
{“success”:false,“error”:{“operation”:{“operationType”:“SET_RELATION”,“table”:“Entity1”,“opResultId”:“relation1”,“payload”:{“conditional”:null,“unconditional”:[{"___ref":true,“opResultId”:“upsert2”,“propName”:“objectId”}],“parentObject”:{"___ref":true,“opResultId”:“upsert1”},“relationColumn”:“relationColumn1”}},“code”:25016,“message”:“Unable to perform ‘SET_RELATION’ operation due to argument incompatibility. The operation references a result from another ‘UPSERT’ operation. The specified result cannot be obtained from this operation (objectId).”},“results”:null}
Sorry for delay with response.
You receive this error because objects IDs for parent and child is not properly referenced in “set relation” command. Your references to the previous operations of transaction are not complete and missing “propName” field.
Valid payload for request should look in this way: