The new room persistence is annoying in kotlin :( hooray for kotlin/java interoperability
d
david.bilik
05/21/2017, 3:12 PM
blakelee: why its annoying? I am thinking about using it on my next project
b
blakelee
05/21/2017, 3:17 PM
Kotlin renames parameters when compiled so it makes the annotation processing weird.
To get a query to work, you have to do something like this
Copy code
@Query("SELECT * FROM table WHERE name = :p0")
fun getByName(name : String) : SomeType
I also don't think TypeConverters work yet for it either. Messed around with it all night yesterday. However, one or two classes in Java isn't so bad. Might only need the dao in Java