Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZDM2ODA4NmRl...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15664?atlOrigin=eyJpIjoiZDM2OD...
) HHH-15664 (
https://hibernate.atlassian.net/browse/HHH-15664?atlOrigin=eyJpIjoiZDM2OD...
) Documentation states that native database array types are unsupported (
https://hibernate.atlassian.net/browse/HHH-15664?atlOrigin=eyJpIjoiZDM2OD...
)
Issue Type: Bug Affects Versions: 6.1.5 Assignee: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: documentation Created: 04/Nov/2022 03:24 AM Fix Versions: 6.2.0, 6.1.6
Priority: Major Reporter: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
The documentation states that “Hibernate doesn’t support native database array types”, but
AFAIU, Hibernate ORM 6 does support them, so we should probably update the documentation?
See
https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibern...
(
https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibern...
) , section “2.9.16. Arrays”:
When discussing arrays, it is important to understand the distinction
between SQL array types and Java arrays that are mapped as part of the
application’s domain model.
Not all databases implement the SQL-99 ARRAY type and, for this reason,
Hibernate doesn’t support native database array types.
Hibernate does support the mapping of arrays in the Java domain model -
conceptually the same as mapping a List. However, it is important to
realize that it is impossible for Hibernate to offer lazy-loading for
arrays of entities and, for this reason, it is strongly recommended to map
a "collection" of entities using a List rather than an array.
Also note this section is apparently using the same anchor ID as “2.9.6. Mapping Arrays”;
we should probably fix that as well.
(
https://hibernate.atlassian.net/browse/HHH-15664#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15664#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#100210- sha1:21ade21 )