See [https://hibernate.zulipchat.com/#narrow/stream/132094-hibernate-orm-dev/topic/HHH-16466|https://hibernate.zulipchat.com/#narrow/stream/132094-hibernate-orm-dev/topic/HHH-16466], [https://github.com/quarkusio/quarkus/issues/34071|https://github.com/quarkusio/quarkus/issues/34071|smart-link]
[https://hibernate.atlassian.net/browse/HHH-16466|https://hibernate.atlassian.net/browse/HHH-16466|smart-link] , merged in 6.2.2, introduced some code in {{EntityBatchLoaderArrayParam}} that relies on reflection {{Array#newInstance}} to instantiate arrays of the ID type.
This doesn’t work in Unfortunately, GraalVM and requires does not allow the use of {{Array#newInstance}} forcing users/frameworks to know what the ID types are and register them for reflection, though that’s only necessary for dialects that support SQL arrays.
This is impractical, so it would be nice if {{EntityBatchLoaderArrayParam}} could avoid using reflection {{Array#newInstance}} .
One solution that’s been mentioned is to expose a method in {{JavaType}} to instantiate an array of that type. We could default to using reflection to avoid breaking backwards compatibility for external implementions of {{JavaType}}, but it would be nice to implement it on all built-in types. |
|