I try my reproducer with hibernate 6.2.0.CR2 and it doesn’t work as expected (and as it works in hibernate 5). Hibernate eagerly fetches third level entities instead of batch queries and generates the following query: select e1_0.id,c1_0.parent_id,c1_0.id,c1_0.name,e1_0.name,e1_0.parent_id from Entity2 e1_0 left join Entity3 c1_0 on e1_0.id=c1_0.parent_id where e1_0.parent_id=? |