fix(persistence): change mode insert or replace to upsert
This commit is contained in:
@@ -32,10 +32,9 @@ class MemberDao extends DatabaseAccessor<MoorChatDatabase>
|
||||
/// Updates all the members using the new [memberList] data
|
||||
Future<void> updateMembers(String cid, List<Member> memberList) async =>
|
||||
batch(
|
||||
(it) => it.insertAll(
|
||||
(it) => it.insertAllOnConflictUpdate(
|
||||
members,
|
||||
memberList.map((m) => m.toEntity(cid: cid)).toList(),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user