-->
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: Expand large lazy loaded object tree for offline use
PostPosted: Thu Nov 16, 2006 10:14 am 
Newbie

Joined: Mon Jul 10, 2006 10:21 am
Posts: 12
Hi,

is it possible in NH 1.2.0 Beta2 to expand alle childs and there childs witch loading by default lazy?

By default our application loads all collections of our object tree lazy but we what to support offline use ( without db connection on notebook ).

I search for something like this:

ses.Load<MyObject>( 111 , FetchAll );

I could use FETCH...but i have to do this for all Collections..this is a liddle bit intricate :-)

Lanwin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 10:54 am 
Regular
Regular

Joined: Tue Jan 03, 2006 11:43 am
Posts: 51
Location: Sweden
You could write something that traverses all associations of an object recursively using reflection while the session is open. That should fetch everything. Just make sure that you keep track of all visited objects, so you don't end up with infinite loops.


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.