persistence
persistence copied to clipboard
IllegalStateException: Class does not have a primary key
I am getting this when I am using data classes
data class Task(val id: Long,
val taskConsecutive: String,
val activityName: String,
val siteName: String,
val taskDescription: String)
It seems we need to support Kotlin types
Try adding the @JvmField annotation to the field: https://kotlinlang.org/docs/reference/java-to-kotlin-interop.html#instance-fields
And maybe this won't work with immutable properties. So I think you might need to use var instead.