diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java index 97432ebc5585c..b1e5a89451e60 100644 --- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java +++ b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java @@ -299,7 +299,7 @@ public JpaModelIndexBuildItem jpaEntitiesIndexer( IndexingUtil.indexClass(jpaModel.getClassName(), indexer, index.getIndex(), additionalIndex, HibernateOrmProcessor.class.getClassLoader()); } - CompositeIndex compositeIndex = CompositeIndex.create(index.getIndex(), indexer.complete()); + CompositeIndex compositeIndex = CompositeIndex.create(index.getComputingIndex(), indexer.complete()); return new JpaModelIndexBuildItem(compositeIndex); } diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java index ee5d21a9e6d96..f8eb837c6c79d 100644 --- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java +++ b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java @@ -349,10 +349,14 @@ private void addClassHierarchyToReflectiveList(Collector collector, DotName clas } // we need to check for enums for (FieldInfo fieldInfo : classInfo.fields()) { - DotName fieldType = fieldInfo.type().name(); - ClassInfo fieldTypeClassInfo = index.getClassByName(fieldType); + Type fieldType = fieldInfo.type(); + if (Type.Kind.PRIMITIVE == fieldType.kind()) { + continue; + } + DotName fieldClassName = fieldInfo.type().name(); + ClassInfo fieldTypeClassInfo = index.getClassByName(fieldClassName); if (fieldTypeClassInfo != null && ClassNames.ENUM.equals(fieldTypeClassInfo.superName())) { - collector.enumTypes.add(fieldType.toString()); + collector.enumTypes.add(fieldClassName.toString()); } } diff --git a/integration-tests/jpa-mapping-xml/legacy-app/src/main/resources/application.properties b/integration-tests/jpa-mapping-xml/legacy-app/src/main/resources/application.properties index fa51f042a2956..a1b57198ea5b4 100644 --- a/integration-tests/jpa-mapping-xml/legacy-app/src/main/resources/application.properties +++ b/integration-tests/jpa-mapping-xml/legacy-app/src/main/resources/application.properties @@ -3,8 +3,3 @@ quarkus.datasource.libraryA.db-kind=h2 quarkus.datasource.libraryB.db-kind=h2 quarkus.hibernate-orm.mapping-files=no-file - -quarkus.index-dependency.libraryA.group-id=io.quarkus -quarkus.index-dependency.libraryA.artifact-id=quarkus-integration-test-jpa-xml-legacy-library-a -quarkus.index-dependency.libraryB.group-id=io.quarkus -quarkus.index-dependency.libraryB.artifact-id=quarkus-integration-test-jpa-xml-legacy-library-b \ No newline at end of file