How to do a bulk delete

Hello,

ich have a app that matches two users. Then they can chat/exchange messages. These messages are stores in a special table called “Messages”.

Now when the day comes that a user deletes the match, I want to delete the messages as well to prevent any anomalies. How can I bulk-delete all messages associated to the two users?

That is what the table looks like:

http://support.backendless.com/public/attachments/7da39517b4ba4f67f6f4a6c2f5c3ce5f.PNG</img>

I do have the ID’s/Objects of the two users at the time I want to delete the messages.

I want to execute it on the ServerCode using Java a my language-of-choice. Would I be possible from the Android client as well?

Hi Felix

Unfortunately you can do that only via REST

https://api.backendless.com/<app version>/data/bulk/&lt;table-name&gt;?where=&lt;where clause&gt;

See documentation here:
https://backendless.com/documentation/data/rest/data_deleting_data_objects.htm

Regards, Vlad

That is sad, but do you also provide docs on how to simply call the REST API from Java?

Hi Felix
I’m really sorry that there is no method for bulk deleting in Android-SDK yet, but this your question is out of the free support policy.
I can suggest you seek information about how to implement working with REST API on some JAVA forum.

Regards, Ilya