Closed melloware closed 2 months ago
/cc @FroMage (panache), @loicmathieu (panache)
Hi,
I checked it out, and it appears the javadoc of getDeclaredId
is wrong, because it follows the same principles as Java's reflection, where declared
means there will be no super-type lookup: it will be limited to the entity type passed as parameter, and not look for its mapped superclasses. You should use getId
to lookup IDs that can be defined in supertypes. I just checked it and that works.
Hope that helps.
i will verify and close this! thanks @FroMage !
š
Describe the bug
Quarkus PrimeFaces original report: https://github.com/quarkiverse/quarkus-primefaces/issues/215
PrimeFaces has an automatic JPA Table so you can just point a JPA Entity an it will handle all paging sorting filtering using Hibernate Criteria Query.
However when it uses the Hibernate Criteria to determine the object's ID its failing with ...
Code:
Failure:
Expected behavior
The
@Id
field exists on the Panache entity and should be found by the MetaModelgetDeclaredId
Actual behavior
It fails with the stack trace above
How to Reproduce?
Unzip this reproducer: quarkus-pf-panache.zip
Run
mvn quarkus:dev
and navigate to http://localhost:8080 you will see the errorOutput of
uname -a
orver
Microsoft Windows [Version 10.0.22631.3737]
Output of
java -version
OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (build 17.0.11+9, mixed mode, sharing)
Quarkus version or git rev
3.12.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.7 (8b094c9513efc1b9ce2d952b3b9c8eaedaf8cbf0)
Additional information
No response