-->
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.  [ 3 posts ] 
Author Message
 Post subject: Runtime Lazy Initialization question
PostPosted: Fri Dec 24, 2004 2:27 am 
Newbie

Joined: Fri Dec 24, 2004 2:02 am
Posts: 4
Can somebody help me how to stop Lazy Initialization at runtime
For example
If i had mentioned lazy='false' and some part of my program i required to stop loading collections at runtime.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2004 4:45 am 
Newbie

Joined: Wed Feb 25, 2004 11:41 pm
Posts: 19
Location: China
I think it's impossible...

Hibernate will load collection automatically so as you set lazy=false

why you dont set it true ...U can init collection at runtime

_________________
who can tell me why?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2004 7:10 am 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
You can have lazy="true" and either use the FETCH keyword in HQL or do Hibernate.initialize() in order to force initialization of your collection.

HTH
Ernst


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.