Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException: Class does not have a primary key #16

Open
margge opened this issue Sep 13, 2018 · 1 comment
Open

IllegalStateException: Class does not have a primary key #16

margge opened this issue Sep 13, 2018 · 1 comment

Comments

@margge
Copy link

margge commented Sep 13, 2018

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

@casidiablo
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants