panache-data-rest: JpaModelIndexBuildItem #48148
-
We have some entities in a quarkus-extension, and we are registering them via the JpaModelBuildItem. But for these entities, the ResourceListener doesn't get registered. The code shows that when registering resource listener's, the panache-data-rest extension scans for JPA entities in the CombinedIndexBuildItem, as seen here, and doesn't find the entity and so skips the registration of the listener. Adding the entity to the AdditionalIndexedClassesBuildItem does register the listener, but then the entity operations fail with IllegalAccessError on access of properties of the entity, so can't do that. Adding the jandex-plugin to the runtime module solves both these issues, so we are proceeding with that. I think JPA entities end up in the JpaModelIndexItem and not the CombinedIndexBuildItem, so maybe the panache-data-rest extension should can JpaModelIndexItem instead of CombinedIndexBuildItem to check for the entity? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
/cc @FroMage (panache), @loicmathieu (panache) |
Beta Was this translation helpful? Give feedback.
-
I'm not sure we should touch this. You don't need |
Beta Was this translation helpful? Give feedback.
I'm not sure we should touch this. You don't need
JpaModelBuildItem
either, you only have to make sure your runtime module is indexed, either manually, or by having abeans.xml
file.