-->
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.  [ 5 posts ] 
Author Message
 Post subject: Lazy associations
PostPosted: Tue Apr 25, 2006 5:32 am 
Newbie

Joined: Thu Apr 20, 2006 3:36 am
Posts: 13
Can anyone help me understand what is meant by Lazy fetchin ???
N how is it helpful ??? In what cases should it be set to true/false/proxy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 25, 2006 6:11 am 
Beginner
Beginner

Joined: Mon Mar 27, 2006 5:25 am
Posts: 39
Location: India Hyderabad
Imagine you have a group of users. Every user has a set of events to attend.

User
- Set Events

User
- Set Events

User
- Set Events


If you apply lazy initialization, it means that you can list all the users, without initializing the Events for each user. It would look like this:

User
- Set events (uninitialized)

User
- Set events (uninitialized)

User
- Set events (uninitialized)


This is used for performance reasons. It is also a logical feature, because you don't need information about the events, if you ask information about the users.

Whenever you want information about the events, hibernate will lazy-load (right on time, when you want it) the events about that user. So imagine you want information about the events of user 1. It will look like this:


User
- Set events (initialized)
- - Event 1
- - Event 2
- - Event 3
- - .......

User
- Set events (uninitialized)

User
- Set events (uninitialized)

----------------------------
dont forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 25, 2006 7:11 am 
Newbie

Joined: Thu Apr 20, 2006 3:36 am
Posts: 13
Thanks Vinay.. But i dint get the link to rate ur reply :(


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 25, 2006 9:29 am 
Beginner
Beginner

Joined: Thu Apr 20, 2006 3:44 am
Posts: 32
http://www.javalobby.org/java/forums/m91885369.html

Refer this thread......might be helpfull

Sudhir


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 25, 2006 9:33 am 
Newbie

Joined: Thu Apr 20, 2006 3:36 am
Posts: 13
Thanks Sudhir.. But i got my reply from the same link.. They have explained it very well :)


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