https://kotlinlang.org logo
#android
Title
# android
v

vivekneel

06/21/2017, 10:59 PM
Hi , What's wrong with this data class?
Copy code
@Entity(
        tableName = "template"
)
data class ListTemplate (
        @PrimaryKey(autoGenerate = true) var id: Long = 0L,
        @SerializedName("name") var name: String = "",
        @SerializedName("thumbnail") var thumbnail: String=  "",
        @SerializedName("category") var category: String = "",
        @SerializedName("totalAmount") var totalAmount: Long = 0L,
        @SerializedName("currency") var currency: String = ""
)
studio is throwing an error saying
Error:Type of the parameter must be a class annotated with @Entity or a collection/array of it.
@here any input on this is much appreciated. Been trying to solve this error ,no luck
g

gildor

06/23/2017, 6:53 AM
data class looks good, but this error message not about data class, you use in some other code I suppose