Katedral Pillon
Katedral Pillon

Reputation: 14864

how to call Parse.Cloud.beforeSave in android

I have a ParseObject called Book. I create a beforeSave function for it so as to avoid duplicates. How do I call the function from the android client? Or is the function magically called by Parse each time I try to persist a Book object? My book class is

ParseClassName("Book")
public class Book extends ParseObject {
...
}

So to save a book object, with the beforeSave filter, do I simply do

Book book = new Book();
...//set fields
book.saveInBackground(...);

Upvotes: 0

Views: 193

Answers (1)

logcat
logcat

Reputation: 283

I believe this may be of use to you: Android: Parse beforesave to database

" beforeSave, afterSave and beforeDelete, afterDelete, get invoked automatically by Parse once an object of the class defined in the function definition is saved. "

Hope it helps.

Upvotes: 1

Related Questions