Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWQ2MjMxOGFj...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16623?atlOrigin=eyJpIjoiNWQ2Mj...
) HHH-16623 (
https://hibernate.atlassian.net/browse/HHH-16623?atlOrigin=eyJpIjoiNWQ2Mj...
) Load all eager batch fetch keys at once when array strategy is configured (
https://hibernate.atlassian.net/browse/HHH-16623?atlOrigin=eyJpIjoiNWQ2Mj...
)
Issue Type: Improvement Assignee: Unassigned Components: hibernate-core Created:
17/May/2023 08:08 AM Fix Versions: 6.wishlist Priority: Major Reporter: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
When loading an entity like the following:
@Entity
@BatchSize(size = 10)
public class MyEntity {
@ManyToOne(fetch = LAZY)
MyEntity assoc;
}
with e.g. a max_fetch_depth of 0, we will end up with batch fetching for the association
assoc , but it will use a batch size of 10 even if the database supports arrays, though it
should fetch all entries at once instead to avoid database ping-pong.
Today we discussed one possible way to fix this, which is to create a dedicated entry for
eager entities in the batch fetch queue.
(
https://hibernate.atlassian.net/browse/HHH-16623#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16623#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#100225- sha1:11e4e77 )