-->
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: How to Set Lazy/Non-Lazy at Transaction basis (not in mappin
PostPosted: Fri Jul 07, 2006 10:27 pm 
Newbie

Joined: Fri Jul 07, 2006 1:30 pm
Posts: 6
Hibernate version: 3.1.1

Is it possible to set the lazy / non-lazy loading of an object and its List member for each individual transaction in java code, as opposed to doing it in the mapping.xml file?

I really hope this can be controlled for different transactions on the same class. PLease tell me its possible, or not. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 10, 2006 8:10 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
With the Criteria API, see setFetchMode() with FetchMode.JOIN or FetchMode.SELECT.

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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.