Skip to content

Commit a5f2a95

Browse files
committed
Register converters and entity listeners for reflection
1 parent e12ed6a commit a5f2a95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ public JpaModelBuildItem discoverModelAndRegisterForReflection() throws BuildExc
142142
}
143143
}
144144

145+
// Hibernate ORM will fall back to instantiating these types using reflection if they are not CDI beans,
146+
// so we need to enable that.
147+
for (DotName javaType : collector.potentialCdiBeanTypes) {
148+
reflectiveClass.produce(ReflectiveClassBuildItem.builder(javaType.toString()).constructors().build());
149+
}
150+
145151
return new JpaModelBuildItem(collector.packages, collector.entityTypes, managedClassNames,
146152
collector.potentialCdiBeanTypes, collector.xmlMappingsByPU);
147153
}

0 commit comments

Comments
 (0)