I am using kotlin-jpa to generate default constructor to my kotlin entity, however, does are not being generated:
I just used:
id("org.jetbrains.kotlin.plugin.jpa") version "1.3.21"
@Entity
data class PlanSubscription(@Id ...
But event with the kotlin-jpa plugin the constructor is not generated:
No default (no-argument) constructor for class
I had a very similar issue. While the advice of not using data classes may or may not be a useful one I found that it was the version of the jpa plugin that was at issue try using version 1.3.41
id "org.jetbrains.kotlin.plugin.jpa" version "1.3.41"
You need to set
`<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>1.1.0</version>
</dependency>`
in your pom.xml