Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Is there any updates? This is a big problem!
da...@google.com <da...@google.com> #3
Hi there - could you provide more context on the issue & a sample project to reproduce? Database locked exceptions are quite difficult to pinpoint without a repro project. Thanks!
sk...@gmail.com <sk...@gmail.com> #4
Hi. It is reproduceable on some users by using this code:
suspend fun <R> MyDatabase.workaroundWithTransaction(block: suspend TransactionScope<R>.() -> R) {
useWriterConnection {
it.immediateTransaction(block)
}
// TODO: Temporally fix https://issuetracker.google.com/issues/340606803#comment2
// Manually triggers invalidation
invalidationTracker.refreshAsync()
}
yb...@google.com <yb...@google.com>
sk...@gmail.com <sk...@gmail.com>
da...@google.com <da...@google.com> #6
Hi. Please merge the pull request. This is big problem!
Description
Version used: 2.1.0-alpha03
Devices/Android versions reproduced on: compilation error
When using suspend SELECT method with TypeConverter parameter, room-compiler generate incorrect method code with return type java.lang.Object.
Compilation exceptions:
• The query returns some columns [...] which are not used by java.lang.Object. You can use @ColumnInfo annotation on the fields to specify the mapping. You can suppress this warning by annotating the method with @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH).
• Not sure how to convert a Cursor to this method's return type (java.lang.Object).
• Query method parameters should either be a type that can be converted into a database column or a List / Array that contains such type. You can consider adding a Type Adapter for this.
But when I remove suspend modifier all is ok.