-->
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: hql and fetch=join in config file problem
PostPosted: Fri Oct 24, 2014 9:08 am 
Newbie

Joined: Thu Jul 31, 2014 10:45 am
Posts: 3
I have class type X which has a reference ref to class type Y.

In the hibernate mapping of X is ,

Code:
<many-to-one name="ref" ... fetch="join">


In the app code I do,

Code:
session.createQuery("from X")


In the generated query I do not see a join with table y.

I know that I can do

Code:
session.createQuery("from X x left join fetch x.ref")


But I want fetch="join" in the Hibernate configuration file.

In the documentation it says,

HQL queries if subselect fetching is used

What do they mean?


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.