Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Thanks for reporting this - Looks like Room is trying to give you a warning, possibly POJO & query result column mismatch, but it fails format the message. I guess safeFormat() is not very safe after all. >.>
Could you please provide your full method signature for the failing query method case? If the return type is a data class it would be nice if you could also provide it.
Could you please provide your full method signature for the failing query method case? If the return type is a data class it would be nice if you could also provide it.
da...@google.com <da...@google.com> #3
What is the alarm sounds that every seems to know about but me it's like I'm being tracked everywhere I go
sk...@gmail.com <sk...@gmail.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c08fa5ad19b227e73cfcf9fd8e0994ec32273bce
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Nov 14 13:38:50 2018
Make RLog's safeFormat() truly safe by catching all exceptions.
Bug: 119520136
Test: RLogTest
Change-Id: I81c8a4ed9e03b64d6762a9976d2dfcd12ea8327b
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
A room/compiler/src/test/kotlin/androidx/room/log/RLogTest.kt
https://android-review.googlesource.com/826949
https://goto.google.com/android-sha1/c08fa5ad19b227e73cfcf9fd8e0994ec32273bce
Branch: androidx-master-dev
commit c08fa5ad19b227e73cfcf9fd8e0994ec32273bce
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Nov 14 13:38:50 2018
Make RLog's safeFormat() truly safe by catching all exceptions.
Bug: 119520136
Test: RLogTest
Change-Id: I81c8a4ed9e03b64d6762a9976d2dfcd12ea8327b
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
A room/compiler/src/test/kotlin/androidx/room/log/RLogTest.kt
yb...@google.com <yb...@google.com>
da...@google.com <da...@google.com> #5
A fix for this will be available in Room 2.1.0-alpha03
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.