I just tried to build WildFly with Hibernate ORM 6.4.0.Final and am seeing
a build failure due to WildFly [1] depending on an internal ORM class
org.hibernate.cache.internal.NaturalIdCacheKey [2] that has a private
constructor.
Would it make sense to add a NaturalIdCacheKey#from method that has the
previous parameters? Or something else?
The WildFly build failure is (also shown via
https://github.com/wildfly/wildfly/pull/17447 ci):
"
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR]
/home/smarlow/work/wildfly/jpa/hibernate6/src/main/java/org/jboss/as/jpa/hibernate/cache/NaturalIdCacheKeyMarshaller.java:[57,47]
incompatible types: java.lang.String cannot be converted to
org.hibernate.persister.entity.EntityPersister
[INFO] 1 error
.
.
.
Error:
/home/runner/work/wildfly/wildfly/jpa/hibernate6/src/main/java/org/jboss/as/jpa/hibernate/cache/NaturalIdCacheKeyMarshaller.java:[57,16]
NaturalIdCacheKey(java.lang.Object,java.lang.String,java.lang.String,int)
has private access in org.hibernate.cache.internal.NaturalIdCacheKey
"
Scott
[1]
https://github.com/wildfly/wildfly/blob/main/jpa/hibernate6/src/main/java...
[2]
https://github.com/hibernate/hibernate-orm/blob/5ea40e255d1f1d10d11047781...
[3]
https://github.com/wildfly/wildfly/pull/17447