Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOWMzNzA3ZTll...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16809?atlOrigin=eyJpIjoiOWMzNz...
) HHH-16809 (
https://hibernate.atlassian.net/browse/HHH-16809?atlOrigin=eyJpIjoiOWMzNz...
) Remove the need for reflection in EntityBatchLoaderArrayParam (
https://hibernate.atlassian.net/browse/HHH-16809?atlOrigin=eyJpIjoiOWMzNz...
)
Change By: Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
See
[
https://hibernate.zulipchat.com/#narrow/stream/132094-hibernate-orm-dev/t...],
[
https://github.com/quarkusio/quarkus/issues/34071|https://github.com/quar...]
[
https://hibernate.atlassian.net/browse/HHH-16466|https://hibernate.atlass...]
, 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.
(
https://hibernate.atlassian.net/browse/HHH-16809#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16809#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:5147d46 )