Backendless Support
 
Assigned to Dev

Fail to add relation to geopoint via REST API

I was trying to add a geopoint with a relation to an User object:

  1. https://api.backendless.com/v1/geo/points?lat=1.5132&lon=2.5123&metadata=%7B%22myuser%22%3A+%7B%22___class%22+%3A+%22Users%22%2C+%22objectId%22%3A%22CD145AF6-689F-AE1E-FF70-2C991BE4CB00%22%7D%7D&categories=test

Then, I encountered a weird issue whereby I got an error code 36 (Duplicate entry with Column "myuser").

Prior, I had cleared all the geopoints in my database. Any advice on why this is happening would be appreciated.

Thanks

Best Answer
photo

Hi Alexander!

Could you check if you use correct objectId in previous request?

Regards,

Kate.

Leave a Comment

Comments (7)

photo
1

Do you get the error when add a geopoint and the geolocation storage is completely empty?

photo
1

When I first tried, the geolocation was filled with the sample data generated by the server. I still got the error after I cleared all my geopoints in the geolocation storage.

photo
1

Yah, I tried it on a new app and it works. But it does not work on the app which I am working on right now.

photo
1

Hi Alexander!

Could you check if you use correct objectId in previous request?

Regards,

Kate.

photo
1

Hi,

yes, I just checked. My bad, the objectId was in fact wrong.

A side note, the error message could have been clearer.

Anyway, thanks for the replies.

photo
photo
1

You are right.

We will make it to more informative.