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.  [ 2 posts ] 
Author Message
 Post subject: Turning on/off lazy loading / association proxies
PostPosted: Wed Jul 19, 2006 9:18 pm 
Newbie

Joined: Tue Apr 06, 2004 7:46 pm
Posts: 4
Hibernate version: 3.0.5

Is it possible to enable/disable lazy loading w/o changing mapping descriptors, on a per query or per session factory level? (Similar to the level of control offered for query cache)?

Thanks,
Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 19, 2006 9:44 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
You can do it per query. In HQL, use "join fetch":
Code:
from A a join fetch a.ProxiedB b
In criteria, use setFetchMode or createAlias, as that forces a join.

_________________
Code tags are your friend. Know them and use them.


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

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.