From ac9b10c8d7b00166c2a2fcb8be58eed67e3b5b87 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 10 Jun 2019 20:27:57 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt b/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt index 732ebc06c..2a32912ee 100644 --- a/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt @@ -3,6 +3,7 @@ package io.legado.app.data.dao import androidx.paging.DataSource import androidx.room.Dao import androidx.room.Insert +import androidx.room.OnConflictStrategy import androidx.room.Query import io.legado.app.data.entities.BookGroup @@ -15,6 +16,6 @@ interface BookGroupDao { @get:Query("SELECT MAX(groupId) FROM book_groups") val maxId: Int - @Insert + @Insert(onConflict = OnConflictStrategy.REPLACE) fun insert(bookGroup: BookGroup) } \ No newline at end of file