The Parse android SDK does not allow updating of a column in the user table
while I am using getCurrentUser()
method to mark it as authenticated. When I call saveInBackground()
on it I get the following error in the log file:
Uncaught internal server error. { [MongoError: exception: Mod on _id not allowed] name: 'MongoError'
Below is the code I am using for saving:
byte[] data = "Working at Parse is great!".getBytes();
final ParseFile file = new ParseFile("abcdef.txt", data);
ParseUser currentUser = ParseUser.getCurrentUser();
if (currentUser != null) {
// do stuff with the user
currentUser.put("column_name", file);
currentUser.saveInBackground(new SaveCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
Log.i("KQ", "update successfully");
} else {
Log.i("KQ", "update error e = " + e);
}
}
});
} else {
// show the signup or login screen
Log.i("KQ", "else");
}