-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Return type of HQL with outer joins
PostPosted: Mon Jul 04, 2011 8:09 am 
Newbie

Joined: Tue Jun 07, 2011 1:02 pm
Posts: 7
I am doing an HQL that is something like this with help of outer joins for eager fetching

FROM A as a
LEFT OUTER JOIN a.b as b
LEFT OUTER JOIN b.c as c

The problem is, the list that is returned by .createQuery().list is List<C> and not List<A>. What should i do to transform the result so that root entity is of type Class A and not C? and I also want the result in such a way that A should be populated with B and B should be populated with C.
Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.