Skip to content

Cannot update custom value in User class #256

Description

@Tridie2000

My User class has a custom property (points). I'm trying to update this property. According to a print statement I added to the code it seems to work except I don't see any change on the server side.

ParseUser user = await ParseUser.currentUser() as ParseUser;
if (user != null) {
   ParseUser incrementUser = ParseUser.forQuery()..getObject(user.objectId);
   incrementUser.set('points', (user.get('points') + 1));
   await incrementUser.save();
   print('save: $incrementUser');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions