Guillaume Toison (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNjJjNjNjZWY2...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16890?atlOrigin=eyJpIjoiNjJjNj...
) HHH-16890 (
https://hibernate.atlassian.net/browse/HHH-16890?atlOrigin=eyJpIjoiNjJjNj...
) StackOverflowError when loading entities with @Proxy(lazy = false) (
https://hibernate.atlassian.net/browse/HHH-16890?atlOrigin=eyJpIjoiNjJjNj...
)
Issue Type: Bug Affects Versions: 6.2.6 Assignee: Unassigned Components: hibernate-core
Created: 04/Jul/2023 09:24 AM Priority: Major Reporter: Guillaume Toison (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
This issue is most likely in relation to HHH-16743 (
https://hibernate.atlassian.net/browse/HHH-16743 ) Closed fixed in 6.2.5 (thank you
Andrea!).
When an entity with @Proxy(lazy=false) is loaded through
BatchInitializeEntitySelectFetchInitializer I get a StackOverFlowError. The problem seems
to persist when the entities are loaded from different paths:
* from a OneToMany
* from a collection with a SqlSelect loader
* from a Criteria query
My very limited understanding of the problem is that
EntitySelectFetchInitializerBuilder.canBatchInitializeBeUsed returns true when an entity
has proxies disabled AND does not have subclasses. In that case the initializer is
BatchInitializeEntitySelectFetchInitializer and we get a StackOverFlowError because the
initializer thinks that a proxy will be created when in reality it issues a new query.
I'm not sure if this should be 3 separate issues but the symptoms seem to be the
same.
(
https://hibernate.atlassian.net/browse/HHH-16890#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16890#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#100228- sha1:4a42edc )