I am trying to relate a Custom Object ( NewWish ) with a BackendlessUser Object . But when I try to do so , I get the error as :
Relation type update is prohibited - property location must relate to table GeoPoint but not LinkedTreeMap
My Code goes like this :
Backendless.Data.mapTableToClass("location", GeoPoint.class);
Backendless.Data.mapTableToClass("original_poster", BackendlessUser.class);
passedobject.setOriginalPoster(originalPoster); //original Poster is retrieved from local cache
Backendless.Data.of(NewWish.class).save(passedobject, new AsyncCallback<NewWish>() {
@Override
public void handleResponse(NewWish response) {
}
@Override
public void handleFault(BackendlessFault fault) {
Log.i("Fault", fault.getMessage());
}
});
What gets really interesting is that I am able to update a User to Geopoint Relation through the same BackendlessUser object without any issue, but it is giving me problem when I related a “NewWish” object to an user object. When I print my original Poster as JSON I get it as :
UserBackendlessUser{location={categories=[Default], latitude=27.684932393494325, longitude=84.42940793931484, metadata={Location=Bharatpur 44200}, objectId=75FE414B-3601-393B-FF15-BF57EAA54500}, Display_name=पाग्ल मुन्छे , __meta={"relationRemovalIds":{},"selectedProperties":["fb_email","searchradius","created","Display_name","___savedRelations","ownerId","pro_pic_url","__meta","password","__relatedschemageopoint","___class","name","location","updated","objectId","email"],"relatedObjects":{"location":["75FE414B-3601-393B-FF15-BF57EAA54500"]}}, pro_pic_url=https://lh3.googleusercontent.com/-47638oDIFbc/AAAAAAAAAAI/AAAAAAAAAP4/4vx6hDhXsRM/photo.jpg, lastLogin=Mar 7, 2016 10:58:34 AM, email=paudelpujan786@gmail.com, updated=Mar 7, 2016 11:00:02 AM, created=Mar 6, 2016 2:04:59 PM, objectId=4C1061A0-A1DE-77F0-FF95-114185D48600, userStatus=ENABLED, searchradius=800}
Please help me as this is getting me really stuck .