Hibernate with Kotlin – powered by Spring Boot

Hibernate with Kotlin – powered by Spring Boot

Gradle, Hibernate, Kotlin, Software Development, Spring
Hibernate with Kotlin - powered by Spring Boot In this post, I'd like to demonstrate what you need to consider when using Hibernate with Kotlin. Hibernate is probably the most famous framework for object-relational mapping (ORM) on the JVM, which is used to persistently store Plain Old Java Objects (POJOs) in relational databases. It also implements the Java Persistence API, a specification that "describes the management of relational data" on the JVM. Summary (TL;DR) Put the kotlin-noarg compiler plugin on your build path, it will generate no-argument constructors for your Hibernate entities. In Gradle, add the following to your buildscript dependencies: classpath("org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}") Further examples can be found here Enable the kotlin-jpa plugin, which works on top of kotlin-noarg by enabling the no-arg generation for Hibernate annotated classes In Gradle, activate…
Read More