Hibernate Eager fetch is not giving data in Latest Version

Hi team,

We have recently Updated to latest hibernate version, On one of the field we were using

@ ManyToOne(targetEntity = ConfigSet.class, fetch = FetchType.EAGER)
@ JoinColumn(name = “fk_config_set”, insertable = false, updatable = false)
private ConfigSet configSet;

This was fetching the configSet data from DB and everything was working as expected.
But with the upgrade we are getting configSet as null (We are able to see data in DB console)

Below are the things we have tried by enabling the SQL logs :

With the exiting implementation :
SELECT field1_alias, field2_alias, field3_alias, field4_alias, field5_alias, field6_alias, field7_alias, field8_alias, field9_alias, field10_alias, field11_alias, field12_alias, field13_alias, field14_alias, field15_alias, field16_alias, field17_alias, field18_alias
FROM pending_users pu1_0
WHERE pu1_0.id = ?

We are not seeing ConfigSet table in the same.

Then we tried to
@ Query(value = “SELECT cc FROM PendingUser cc JOIN FETCH cc.configSet WHERE cc.userUUID = :userUUID”)
on Optional findByUserUUID(UUID userUUID); method

the below is query :

SELECT pu.id AS user_id, pu.extension AS user_extension, pu.email AS user_email,
cs.id AS config_id, cs.name AS config_name, cs.language AS config_language
FROM pending_users pu
JOIN config_set cs ON cs.id = pu.fk_config_set
WHERE pu.fk_users = ?

But the config Set is null,
We also tried
@ EntityGraph(value=“PendingUser.ConfigSet”)

SQL query :
SELECT pu.id AS user_id, pu.extension AS user_extension, pu.email AS user_email,
cs.id AS config_id, cs.name AS config_name, cs.language AS config_language
FROM pending_users pu
LEFT JOIN config_set cs ON cs.id = pu.fk_config_set
WHERE pu.fk_users = ?

Result is same…

Could you guys please suggest what made the fetch Type eager has caused the issue,

Did you try the latest Hibernate ORM version yet? If so and it doesn’t work, please try to create a reproducer with our test case template and if you are able to reproduce the issue, create a bug ticket in our issue tracker and attach that reproducer.