Skip to content

Commit

Permalink
Add classes from additional JPA model build items to pre-generate pro…
Browse files Browse the repository at this point in the history
…xies
  • Loading branch information
marko-bekhta committed Nov 20, 2023
1 parent 6c11d36 commit c48339d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ public BytecodeRecorderConstantDefinitionBuildItem pregenProxies(
JpaModelIndexBuildItem indexBuildItem,
TransformedClassesBuildItem transformedClassesBuildItem,
List<PersistenceUnitDescriptorBuildItem> persistenceUnitDescriptorBuildItems,
List<AdditionalJpaModelBuildItem> additionalJpaModelBuildItems,
BuildProducer<GeneratedClassBuildItem> generatedClassBuildItemBuildProducer,
LiveReloadBuildItem liveReloadBuildItem) {
Set<String> managedClassAndPackageNames = new HashSet<>(jpaModel.getEntityClassNames());
Expand All @@ -426,6 +427,11 @@ public BytecodeRecorderConstantDefinitionBuildItem pregenProxies(
// is used for packages too, and it relies (indirectly) on getManagedClassNames().
managedClassAndPackageNames.addAll(pud.getManagedClassNames());
}

for (AdditionalJpaModelBuildItem additionalJpaModelBuildItem : additionalJpaModelBuildItems) {
managedClassAndPackageNames.add(additionalJpaModelBuildItem.getClassName());
}

PreGeneratedProxies proxyDefinitions = generatedProxies(managedClassAndPackageNames,
indexBuildItem.getIndex(), transformedClassesBuildItem,
generatedClassBuildItemBuildProducer, liveReloadBuildItem);
Expand Down

0 comments on commit c48339d

Please sign in to comment.