elementcollection embeddable contains only nulls when loading in multiple steps

Description

Hi, I think HHH-16811 breaks the loading of relations in multiple steps. This kind of loading is vital when there are multiple 1-N relations in an entity to avoid cartesian product queries (see for example )

I see the problem in hibernate 6.2.7 but not hibernate 6.2.6

So with the following setup (I’m adding here only relevant sections of code, I’ll attach a full springboot test case) (sorry it’s not plain hibernate but hopefully not a problem) (note that I didn’t have to have multiple bags, you already see the problem with one relation)

the following works:

 

But the following does not work (the list holds a null instead of the embedable object)

See attached testcase:

(or use springboot 3.1.2 in pom.xml which uses 6.2.6.Final by default)

Attachments

1

Activity

Show:

Jon Harper September 27, 2023 at 7:33 PM

Awesome thanks for the swift repair !

Fixed

Details

Assignee

Reporter

Worked in

Sprint

Fix versions

Affects versions

Priority

Created September 25, 2023 at 10:42 AM
Updated October 5, 2023 at 12:28 AM
Resolved September 27, 2023 at 3:29 PM