Could not create new GeoPoint related to Data.

After upgrade to Backendless 4.x I lost my functionality to create new GEO point with my object. There is no error on persist data. Unfortunately GeoPoint is not created/updated. Data object “device” is updated correctly.

Thank you for any help.

There is part of my code. Please note that I get existing device object by: dataQuery.setRelated(“location”);


Date date = new SimpleDateFormat("dd/MM/yy HH:mm:ss").parse(dateString);


Map<String, Object> meta = new HashMap<String, Object>();
meta.put("timestamp", date.getTime() / 1000);


// Do not keep tracking history
GeoPoint location = device.getLocation();
if (location == null) {
	// not location set yet, create location object first
	location = new GeoPoint();
	location.addCategory("Senior");
}


location.setLatitude(ping.getLatitude());
location.setLongitude(ping.getLongitude());
location.setMetadata(meta);


device.setLocation(location);
Backendless.Persistence.save(device, new AsyncCallback<SeniorTracking>() {...});

By creation/update data object I expect also automatical creation/update child GEO point object.

Hi Martin,

The support for automatic creation and update of relations has been removed in version 4: https://backendless.com/docs/android/doc.html#version_differences
You should use Relation API to manage relations instead: https://backendless.com/docs/android/doc.html#data_relations_api_set_add_android

Hi Sergey,

thank you for your support, I see the change now.

Unfortunately this “little” change kills the easy way of using Backendless. I know that it is more powerfull now but also more strange for using.