Bug 1197261

Summary: [GSS] (6.4.z) HHH-9642 - Embedded OneToMany association fetch join does not work in CriteriaQuery
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Stephen Fikes <sfikes>
Component: HibernateAssignee: Gail Badner <gbadner>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Simka <msimka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.1CC: bmaxwell, cdewolf, gbadner, jawilson, msimka, smarlow
Target Milestone: CR1   
Target Release: EAP 6.4.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1201912 1201914 1230279 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1196113, 1201912, 1201914, 1219165, 1230279    
Attachments:
Description Flags
Simple Maven based pure-hibernate test none

Description Stephen Fikes 2015-02-27 23:34:55 UTC
Created attachment 996264 [details]
Simple Maven based pure-hibernate test

Description of problem:
When using join fetch for an association that is part of an @Embeddable, the association is not joined or fetched

Version-Release number of selected component (if applicable):
Hibernate 4.2.x

How reproducible:
Consistently

Steps to Reproduce:
root.fetch(ParentEntity_.embedded).fetch(EmbeddedEntity_.children);

Actual results:
The root class is fetched. The SQL shows no join and subsequent access to the association results in an implicit database query.

Expected results:
The assocation should be join fetched

Additional info:
Test seems to conform to the example in http://docs.jboss.org/hibernate/orm/4.2/devguide/en-US/html/ch12.html#querycriteria-from-fetch

Comment 5 Stephen Fikes 2015-03-04 17:12:16 UTC
https://hibernate.atlassian.net/browse/HHH-9642

Comment 7 Gail Badner 2015-03-13 04:43:22 UTC
Fixed upstream in 4.2 branch by commit: https://github.com/hibernate/hibernate-orm/commit/1227b73e1e7430122d0b390fc053770844e68af3

Comment 8 Martin Simka 2015-06-22 14:48:12 UTC
verified
EAP 6.4.2.CP.CR1

Comment 9 Petr Penicka 2017-01-17 10:16:38 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Comment 10 Petr Penicka 2017-01-17 10:16:39 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.