Thiago12/07/2017, 8:02 PM
r4zzz4k12/07/2017, 8:21 PM
r4zzz4k12/07/2017, 8:25 PM
annotation on method (constructor in your case) with default arguments on Kotlin side. This will generate one additional method for each substituted default value on Java side. I.e. for
there would be constructors with two, one and zero arguments. That's not really the thing you want probably. 2. Add
data class C @JvmOverloads constructor(val a: Int = 5, val b: String = "Hello!")
plugin mentioned to answers. Look through the https://kotlinlang.org/docs/reference/compiler-plugins.html#no-arg-compiler-plugin -- it mentions that this plugin specifically creates additional no-arg constructor for JPA to consume. After calling it, JPA will fill your values as fields.
Thiago12/07/2017, 11:10 PM