1
我将迁移添加到了我的项目中。经过很多工作后,我将其独立运行。尝试更新时出现错误如何设置可空区域对象
@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);