Hi,
I’m having some to save objects to Backendless. I’m trying the same method as proposed in the documentation. Here is my code:
Backendless.Persistence.save(desire, new AsyncCallback<Desire>() {
public void handleResponse( Desire response ){
}
public void handleFault( BackendlessFault fault ){
// an error has occurred, the error code can be retrieved with fault.getCode()
}
});
But each time this code is executed, the handleFault method is called. The faultCode is IllegalArgumentException, detail is null and message is: “weborb/util/ObjectInspector”. My Desire class has the following attributes:
private String objectId;
private int name;
private int unit;
private int state;
private double quantity;
All attributes have public getters and setters.
The backendless database has a table named Desire with the following columns:
unit | data type: int
state | data type: int
name | data type: int
quantity | data type: double
Searching and deleting Desire objects works fine, but I can’t get save working. Does anyone have any idea what I am doing wrong? Thanks on advance.
With kind regards.