Backendless Support
 
Assigned to Dev

Update User with GeoPoint relationship - metadata ignored

Im trying to update a User and update/create GeoPoint relationship at the same request. For this I request the following:

PUT: /data/Users/{_XXXX_UserObjectID_XXX}

BODY:

  1. {
  2. "firstname":"ABC",
  3. "email": "abc@abc_domain.com",
  4. "favoritePlace": {
  5. "___class": "GeoPoint",
  6. "categories": [
  7. "Geo_Party"
  8. ],
  9. "latitude": 51.11014399999999,
  10. "longitude": 17.025433,
  11. "metadata": {
  12. "googlePlaceID": "ChIJnQ0s3grCD0cRg1YORUpe5GI",
  13. "venueName": "Bezsenność"
  14. }
  15. }
  16. }

With this request what will happen is that user parameters "firstname" and "email" will be updated, also "favoritePlace" will have a relationship to a new GeoPoint but without Metadata. I need the metadata to be stored and not ignored.

Am I missing something or do I need a separate request to create the GeoPoint. I noticed that if I do POST on Users with GeoPoint (when creating a user), it creates a new user with a new GeoPoint and its metadata (as expected).

Leave a Comment

Comments (1)

photo
1

Hello Bugdroid,

I've reproduced the behavior you described, request looks correct. As a workaround I'd recommend to keep this request for creating a point and establishing a relation with it, and to use a separate request for updating metadata.

I've created an internal ticket which you can reference by id 14038, we'll notify as soon as it is fixed.

Regards Anton