Start a new topic

put extra parameter on saving a record

Hi guys,


I have an object Visitor need to be saved. But I need to put an extra parameter (visitedBefore) for backend to check but this parameter/value will not be saved into database.


public class Visitor extends GenericJson {


    @Key("_id")

    private String id;

    @Key

    private String name;

    @Key

    private String email;

    @Key

    private String phone;


    private boolean vistedBefore;


}


getKinveyClient().appData("visitor", Visitor.class).save(visitor, new KinveyClientCallback<Visitor>() {

            @Override

            public void onSuccess(Visitor result) {


            

           }


});


How would I pass this parameter to backend that I can access with request.body.vistedBefore or other way?


Cheers,

Mark Thien

1 Comment

You should add the @Key annotation on your field
Login or Signup to post a comment