Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Also noticed that crash happens ~7-8 times per user.
se...@gmail.com <se...@gmail.com> #3
It looks like Room 2.1.0 is not using androidx.sqlite:sqlite-framework:2.0.1 which should contain a fix for the situation you are just describing. The snippet of code you pasted for getWrappedDb() is different than what is in the head of the repo. See: https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/persistence/db-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.java#152
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #4
This is a proper fix IMO. However, I can't find the package in http://maven.google.com/androidx/ . There I found only 2.0.0. Where else should I look? Also, the latest room 2.1.0-alpha4 does not include this version as well.
Description
Component used: Room
Version used: 2.3.0-alpha04
Devices/Android versions reproduced on: Emulator API 26 with google services
Case 1: Consider Base DAO class
And class
It is expected that the generated implementation code will have 3 Update methods with corresponding conflict strategies.
What is actually generated:
Actual - all update methods are using the same adapter with ABORT.
Case 2: Change very first update strategy to IGNORE in BaseDao
And now adapter becomes:
Case 3: Use case 2 and add a new method to ComanyDao:
then update implementation becomes