美文网首页
'User' has a primary key

'User' has a primary key

作者: 03a9db709e59 | 来源:发表于2017-10-26 19:25 被阅读157次

Primary keys are immutable since Realm 2.0.0, which means you cannot modify them after the object has been created. So pass it at the time of object creation.

Useruser=realm.createObject(User.class,UUID.randomUUID().toString());user.setFirstName("Theo");user.setLastName("Larsen");

文章出处:https://stackoverflow.com/questions/41046279/user-has-a-primary-key-use-createobjectclasse-object-instead

相关文章

网友评论

      本文标题:'User' has a primary key

      本文链接:https://www.haomeiwen.com/subject/glzkpxtx.html