Updates in tables with more than one relationship using REST

Hi. I am using REST API to send this request:

PUT /v1/data/Local/921741D6-E3F6-391A-FFB7-42E561EF3800 HTTP/1.1
Host: api.backendless.com
Content-Length: 340
User-Agent: Guzzle/3.8.0 curl/7.28.1 PHP/5.4.10
application-id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
secret-key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
application-type: REST
Content-Type: application/json

{
“nombre”: “local 2”,
“__meta”: “ofertas:3B7D4765-2344-A8D5-FFEC-091EE1185700;categoria:6730AC4A-588D-A3E1-FF73-CFE905885E00”,
“descripcion”: “desc”,
“ofertas”: [],
“categoria”: {
“objectId”: “6730AC4A-588D-A3E1-FF73-CFE905885E00”,
“___class”: “Categoria”
},
“empresa”: {
“objectId”: “0F0471A4-5B29-0A45-FF5C-D612C882F100”,
“___class”: “Empresa”
}
}

With this i want to remove “ofertas” objects from the relationship. In the response i see that, in fact, “ofertas” relationship is now empty:

HTTP/1.1 200 OK
{
“direccion”: null,
“horario”: null,
“ownerId”: null,
“ofertas”: [],
“telefono”: null,
“descripcion”: “desc”,
“__meta”: “categoria:6730AC4A-588D-A3E1-FF73-CFE905885E00;empresa:0F0471A4-5B29-0A45-FF5C-D612C882F100”,
“paginaWeb”: null,
“___class”: “Local”,
“nombre”: “local 2”,
“twitter”: null,


}
}

But if i send GET Request again to get update data, no changes were saved in database. I have tried it many times, always get the same response but no updates in database. I checked in console too, no changes.

I made another test, this time with this in request:

{
“nombre”: “local 2”,
“__meta”: “ofertas:0962481D-05BB-AF66-FF99-35F2C121DD00”,
“descripcion”: “desc”,
“ofertas”: [],
“categoria”: {
“objectId”: “6730AC4A-588D-A3E1-FF73-CFE905885E00”,
“___class”: “Categoria”
},
“empresa”: {
“objectId”: “0F0471A4-5B29-0A45-FF5C-D612C882F100”,
“___class”: “Empresa”
}
}

And finally got the update in database. So, when i have two or more relationships in meta, no changes are saved in database, but if i only have one relation in meta, everything is OK. What can i do in the case i would like to update two or more relationships in the same REST request?

Hi Andres,

We are looking into it.

Regards,
Mark

Thanks Mark! Please let me know if you solved it or if there is a workaround for updating two or more relationships in one API call.