-->
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: load Set only when access it
PostPosted: Wed Sep 29, 2004 8:54 am 
Newbie

Joined: Wed Sep 15, 2004 9:35 am
Posts: 13
Hi,
I have a class in which is a vector.
I would like only to load the vector, when I access it.

Here an example:

public class myClass{
private Set childs;


getChilds...
setChilds...
}

main(){
myClass a=new myClass();// now the vector should not be loaded
a.getChilds.get(1);// now the vector should be loadet.


How can i do this with hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 29, 2004 9:01 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
Declare the set as "lazy" in the mapping file.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 29, 2004 9:18 am 
Newbie

Joined: Wed Sep 15, 2004 9:35 am
Posts: 13
thx you :)


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.