Using Room, having defined an `@Entity` as a `data...
# android
s
Using Room, having defined an
@Entity
as a
data class
. How do I define my
@Database class
?
@Database(entities = {MyDataClass::java.class}, version = 1)
is not allowed
l
I guess it expects an array of classes so you can write
@Database(entities = [MyDataClass::java.class], version = 1)
or
@Database(entities = arrayOf(MyDataClass::java.class), version = 1)
depending on your kotlin version
­čĹŹ 2
s
Thanks