Description of problem: https://hibernate.atlassian.net/browse/HHH-10563
I've pushed the fix upstream. There are 2 commits: The first adds logging that shows each time that the subselect fetch query fragment is created: https://github.com/hibernate/hibernate-orm/commit/8fb8a158d3cebc979fdb6bfd127279cb84084802 The second commit is the fix: https://github.com/hibernate/hibernate-orm/commit/0d5c35cdbc99d871515d9ed33d4d658fc2726253 In order to reproduce and verify the fix: 1) revert the second commit; 2) enabling trace logging for org.hibernate.engine.spi.SubselectFetch; 3) execute hibernate-core unit tests; 4) grep the hibernate-core test results for "SubselectFetch query" and note the number of occurrences; 5) apply the 2nd commit; 6) grep the hibernate-core test results for "SubselectFetch query" and note the number of occurrences; there should be about 1/4 as many occurrences.
Verified with EAP 6.4.8.CP.CR2
Carlo de Wolf <cdewolf> updated the status of jira JBEAP-3708 to Resolved
Jiri Pallich <jpallich> updated the status of jira JBEAP-3708 to Closed
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.