Backendless Support
 
Waiting for user's response

Wrong Schema Error code 2004

Am getting the error

  1. Backendless Fault = BackendlessFault{ code: '2004', message: 'Wrong schema: mypackagename.ModelClass$1}

ModelClass table has a 1:N relationship with my Users table at a depth of 1.

Surprised because it was working before until i wrote an interface between a photo chooser dialog and the fragment that makes the backendless call to send the ModelClass values to the backend. A photo url retrieved from Files is one of the values being stored.

What could i have done wrong?

Coincidentally, i have 7 other classes each correspoding to a table with a 1:N relationship with the Users table in the backend that are working fine, all structured the same, and implementing the said interface.

Leave a Comment

Comments (4)

photo
1

Hi George,

Can you please publish the code of your data classes?

photo
1

  1. public class ModelClass1 implements Parcelable {
  2. public int id;
  3. public String firstName;
  4. public String lastName;
  5. public String dateFrom;
  6. public String dateTo;
  7. public String modelClass1Photo1Path;
  8. public String modelClass1Photo2Path;
  9. public String modelClass1Photo3Path;
  10. @Override
  11. public int describeContents() {
  12. return 0;
  13. }
  14. @Override
  15. public void writeToParcel(Parcel dest, int flags) {
  16. dest.writeInt(this.id);
  17. dest.writeString(this.firstName);
  18. dest.writeString(this.lastName);
  19. dest.writeString(this.dateFrom);
  20. dest.writeString(this.dateTo);
  21. dest.writeString(this.modelClass1Photo1Path);
  22. dest.writeString(this.modelClass1Photo2Path);
  23. dest.writeString(this.modelClass1Photo3Path);
  24. }
  25. public ModelClass1() {
  26. }
  27. protected ModelClass1(Parcel in) {
  28. this.id = in.readInt();
  29. this.firstName = in.readString();
  30. this.lastName = in.readString();
  31. this.dateFrom = in.readString();
  32. this.dateTo = in.readString();
  33. this.modelClass1Photo1Path = in.readString();
  34. this.modelClass1Photo2Path = in.readString();
  35. this.modelClass1Photo3Path = in.readString();
  36. }
  37. public static final Parcelable.Creator<ModelClass1> CREATOR = new Parcelable.Creator<ModelClass1>() {
  38. @Override
  39. public ModelClass1 createFromParcel(Parcel source) {
  40. return new ModelClass1(source);
  41. }
  42. @Override
  43. public ModelClass1[] newArray(int size) {
  44. return new ModelClass1[size];
  45. }
  46. };
  47. }

photo
1

I've tried the getters & setters version of the data class as well.

photo
1

The class looks fine at first site. Please, prepare a minimal sample which could be run as is and would reproduce the problem you described.