StackOverflowError with @Fetch(FetchMode.SELECT) mapped for entity with an ID that is a bidirectional one-to-one eager association

Description

StackOverflowError is thrown when loading an entity with an ID that is an bidirectional eager one-to-one association has FetchMode.SELECT mapped, as in the following:

This happens when loading by ID using a query and when loading by primary key with EntityManager#find.

In addition, loading by ID using EntityManager#find fails with FetchMode.SELECT, whether lazy or eager due to HHH-14389.

Activity

Show:

Former user March 2, 2021 at 10:25 PM

Fixed in master and 5.4 branches.

Former user February 25, 2021 at 2:16 AM

Reopened it while considering a different way to fix this. See the PR for for details:
https://github.com/hibernate/hibernate-orm/pull/3753

Former user February 11, 2021 at 9:53 PM

Fixed in master and 5.4 branches.

Fixed

Details

Assignee

Reporter

Components

Affects versions

Priority

Created January 6, 2021 at 3:22 AM
Updated July 13, 2021 at 10:32 PM
Resolved March 2, 2021 at 10:25 PM