Fixed
Status Update
Comments
yb...@google.com <yb...@google.com>
ya...@google.com <ya...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ffdfeefa970346dd2a60a5b2a3aa05e733ed6d66
Author: Yuichi Araki <yaraki@google.com>
Date: Thu Nov 29 14:28:57 2018
Allow Collection as a parameter of IN
Test: SimpleEntityReadWriteTest.queryByCollection
Bug: 119884035
Change-Id: Ia1e6b3e57e706fb717c910d04f6938311d703d8b
M room/compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/SimpleEntityReadWriteTest.java
https://android-review.googlesource.com/836606
https://goto.google.com/android-sha1/ffdfeefa970346dd2a60a5b2a3aa05e733ed6d66
Branch: androidx-master-dev
commit ffdfeefa970346dd2a60a5b2a3aa05e733ed6d66
Author: Yuichi Araki <yaraki@google.com>
Date: Thu Nov 29 14:28:57 2018
Allow Collection as a parameter of IN
Test: SimpleEntityReadWriteTest.queryByCollection
Bug: 119884035
Change-Id: Ia1e6b3e57e706fb717c910d04f6938311d703d8b
M room/compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/SimpleEntityReadWriteTest.java
Description
@Dao
interface MyDao {
@Query("DELETE FROM mytable WHERE id IN (:ids)")
fun deleteByIds(ids: Collection<String>)
}
Results in the following error:
e: error: 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. - arg0 in deleteByIds(java.util.Collection<java.lang.String>)
Currently we can pass only List, Array and Set (not mentioned in the error message) to IN operator but it should be possible to pass Collection too.