Cannot access realm that has been closed
索引的realm对象需要转换:
message = this.delcommontChat(message);
convertToArray(realmObjectsArray){
let copyOfJsonArray = Array.from(realmObjectsArray);
let jsonArray = JSON.parse(JSON.stringify(copyOfJsonArray));
return jsonArray;
}
realm at path already opened on current thread with different schema
调用完数据库需要进行关闭,才能在另一个地方调用另一个数据库
realm.close();
网友评论