# announcements


10/03/2019, 12:37 PM
Hello all. Fairly new to Kotlin, but loving it so far. One area that is causing some consternation is that of JPA/Hibernate and the correct way to do it in Kotlin. All the blogs and articles that I’ve read on the subject appear to contradict each other with regards to whether to use data classes or not; what to put in the constructor; should properties be val or var. Can anyone point me in the direction of a clear and unambiguous example of how JPA/Hibernate entities should be defined in Kotlin? I’m look for the best practice.

Matteo Mirk

10/03/2019, 1:20 PM
you could try asking in #jpa and #hibernate


10/03/2019, 2:57 PM
there is also a #spring (which is active, not like the other two). there is a chapter on jpa, bottom line don't use data classes ( and don't use immutability. jpa does not cope well with immutability (though most people don't have problems there)