h3. Describe the bug
I have the following field in my entity:
{noformat}[...] public class Rule { [...] @JdbcTypeCode(SqlTypes.JSON) @Column(name = "condition", columnDefinition = "json") private Predicate condition; [..] }{noformat}
During quarkus startup I now get following warning:
{noformat}2023-05-05 11:36:39,583 WARN [org.hib.met.int.MetadataContext] (JPA Startup Thread) HHH015011: Unable to locate static metamodel field : com.activelogistics.wolf.webruleservice.rule.db.model.Rule_#condition; this may or may not indicate a problem with the static metamodel {noformat}
The metamodel is generated by following dependency:
{noformat} <dependency> <groupId>org.hibernate.orm</groupId> <artifactId>hibernate-jpamodelgen</artifactId> <scope>provided</scope> </dependency>{noformat}
The field condition is indeed missing in the metamodel.
During the Q3 migration, I changed the field from this:
{noformat} @Type(type = "io.hypersistence.utils.hibernate.type.json.JsonNodeBinaryType") @Column(name = "condition", columnDefinition = "json") private Predicate condition;{noformat}
And the condition was included in the metamodel.
Could it be, that {{JdbcTypeCode}} is not respected by the metamodel generator and therefore the field not included?
h3. Expected behavior
_No response_
h3. Actual behavior
_No response_
h3. How to Reproduce?
Reproducer: see attachment [orm-warning-json.zip|https://github.com/quarkusio/quarkus/files/11406031/orm-warning-json.zip] # mvn clean compile quarkus:dev install # Warning is printed Now run the unit test {{JPAUnitTestCase}} # 2023-05-11 13:29:09 WARN MetadataContext:711 - HHH015011: Unable to locate static metamodel field : org.hibernate.bugs.MyEntity_#condition; this may or may not indicate a problem with the static metamodel h3. Output of {{uname -a}} or {{ver}}
MINGW64_NT-10.0-19045 NANBCHL9NG3 3.3.6-341.x86_64 2022-09-05 20:28 UTC x86_64 Msys
h3. Output of {{java -version}}
openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment Temurin-17.0.4+8 (build 17.0.4+8) OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (build 17.0.4+8, mixed mode, sharing)
h3. GraalVM version (if different from Java)
_No response_
h3. Quarkus version or git rev
3.0.2.Final
h3. Build tool (ie. output of {{mvnw --version}} or {{gradlew --version}})
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: C:\eclipse\tools\java\maven Java version: 17.0.4, vendor: Eclipse Adoptium, runtime: C:\eclipse\tools\java\17 Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
h3. Additional information
_No response_ |
|