Reputation: 1
I'm having troubles generating metamodel classes with hibernate-jpamodelgen to use with Criterta.
To reproduce, generate a quarkus project on quarkus.io with Hibernate ORM and add the following dependency to the pom:
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>6.1.7.Final</version>
</dependency>
In this demo project, there is a class MyEntity:
@Entity
public class MyEntity {
@Id
@GeneratedValue
public Long id;
public String field;
}
I expect hibernate-jpamodelgen to generate a class MyEntity_, as it does with all my @Entities in other Spring Boot projects.
On Spring Boot, I have to add jaxb-api
and jaxb-runtime
as well. But then its working flawlessly. On quarkus I've added those and tried quarkus-jaxb. It's still not working.
I've enabled annotation processors in IntelliJ and set the Maven output to DEBUG. There were no Errors.
Upvotes: 0
Views: 1122
Reputation: 343
Assuming you're on Quarkus 2.x, please observe it still uses Hibernate 5.6 under the hood, so the metamodel generator will work when you align the version. Try using org.hibernate:hibernate-jpamodelgen:5.6.15.Final
.
Upvotes: 1