deviant
02/20/2018, 3:27 PM@Entity
data class User(val id:Long) {
@Transient private val chunks = Set<String>() // this is always null when read from db
}
I use spring, hibernate and kotlin-jpa plugin. When i read data from db with spring-data the User entity has all filled columns from the table. All good except that transient chunks property. It is always null. As i understood kotlin-jpa plugin generates empty constructor and uses it on entity instantiation. But the chunks property initializes itself in normal constructor. Is there any workaround how can i initialize transient property?