1
내 프로젝트에 마이그레이션을 추가했습니다. 많은 일을 한 후에 독립형으로 일하게되었습니다. 업데이트를 시도 할 때 오류가 발생합니다.nullable 영역 객체를 설정하는 방법
@PrimaryKey field 'id' does not support null values in the existing Realm file. Migrate using RealmObjectSchema.setNullable(), or mark the field as @Required
이것은 내가 추가하는 객체의 값 기능이 아닙니다. 누구든지이 작업을 수행하는 방법에 대한 자세한 내용이나 문서 링크를 제공 할 수 있습니까? 나는이 변수
@PrimaryKey
private String id;
편집 아무것도에게
을 찾을 수 없습니다 : 당신은 이전 코드베이스를 업데이트 한 음이라면, 당신을
schema.get("Log").setNullable("id", true);