Parse android sdk가 사용자 테이블의 열을 업데이트하지 못하도록합니다. getCurrentUser 인증 된 것으로 표시하지만 저장을 호출하면됩니다. 그것은 나에게구문 분석 ANDROID SDK가 로그에 [MongoError : exception : Mod : _id 허용되지 않음]을 반환 할 수 없습니다.
Uncaught internal server error. { [MongoError: exception: Mod on _id not allowed]
name: 'MongoError'
아래 난 당신이 사용자 객체에 연결하기 전에 ParseFile을 저장해야
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");
}
문제는 파일 저장 문제가 아닙니다. mongo 테이블의 레코드를 업데이트하는 동안 기본 키인 _id를 업데이트 할 수 없으며, 그 대신 수행 할 작업 또는 id 매개 변수를 retrofit 또는 android에서 제거 할 수있는 방법이 있습니다. – Debugger