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