kotlinjpa-2.1metamodel

Koitlin support for JPA static metamodel


When I create an Entity class using Java JPA static meta models are generated.

If I convert my Entities to Kotlin JPA static metamodels are not generated.

How to solve this problem?

EDIT

I am using Gradle as build tool.


Solution

  • I had to use kapt plugin.

    I had to add following line to my build.gradle file.

    kapt "org.hibernate:hibernate-jpamodelgen:${hibernate_version}"